From 0ee7cc932ca9c973b086f847a38d29531a815712 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 31 Jan 2005 11:47:44 +0000 Subject: many fixes --- (limited to 'korganizer/kotodoview.cpp') diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 8d8fc2a..82437d8 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -334,6 +334,7 @@ void KOQuickTodo::focusOutEvent(QFocusEvent *ev) KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : KOrg::BaseView(calendar,parent,name) { + mPendingUpdateBeforeRepaint = false; isFlatDisplay = false; mNavigator = 0; QBoxLayout *topLayout = new QVBoxLayout(this); @@ -533,14 +534,26 @@ void KOTodoView::jumpToDate () // if ( mActiveItem->todo()->hasDueDate() ) // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); } - +void KOTodoView::paintEvent(QPaintEvent * pevent) +{ + if ( mPendingUpdateBeforeRepaint ) { + updateView(); + mPendingUpdateBeforeRepaint = false; + } + KOrg::BaseView::paintEvent( pevent); +} + bool mPendingUpdateBeforeRepaint; void KOTodoView::updateView() { pendingSubtodo = 0; if ( mBlockUpdate ) { - //qDebug("blocked "); return; } + if ( !isVisible() ) { + mPendingUpdateBeforeRepaint = true; + return; + } + //qDebug("KOTodoView::updateView() %x", this); if ( isFlatDisplay ) { setAllFlat(); return; -- cgit v0.9.0.2