-rw-r--r-- | korganizer/kotodoview.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
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; |