-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) | |||
334 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 334 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
335 | KOrg::BaseView(calendar,parent,name) | 335 | KOrg::BaseView(calendar,parent,name) |
336 | { | 336 | { |
337 | mPendingUpdateBeforeRepaint = false; | ||
337 | isFlatDisplay = false; | 338 | isFlatDisplay = false; |
338 | mNavigator = 0; | 339 | mNavigator = 0; |
339 | QBoxLayout *topLayout = new QVBoxLayout(this); | 340 | QBoxLayout *topLayout = new QVBoxLayout(this); |
@@ -533,14 +534,26 @@ void KOTodoView::jumpToDate () | |||
533 | // if ( mActiveItem->todo()->hasDueDate() ) | 534 | // if ( mActiveItem->todo()->hasDueDate() ) |
534 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); | 535 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); |
535 | } | 536 | } |
536 | 537 | void KOTodoView::paintEvent(QPaintEvent * pevent) | |
538 | { | ||
539 | if ( mPendingUpdateBeforeRepaint ) { | ||
540 | updateView(); | ||
541 | mPendingUpdateBeforeRepaint = false; | ||
542 | } | ||
543 | KOrg::BaseView::paintEvent( pevent); | ||
544 | } | ||
545 | bool mPendingUpdateBeforeRepaint; | ||
537 | void KOTodoView::updateView() | 546 | void KOTodoView::updateView() |
538 | { | 547 | { |
539 | pendingSubtodo = 0; | 548 | pendingSubtodo = 0; |
540 | if ( mBlockUpdate ) { | 549 | if ( mBlockUpdate ) { |
541 | //qDebug("blocked "); | ||
542 | return; | 550 | return; |
543 | } | 551 | } |
552 | if ( !isVisible() ) { | ||
553 | mPendingUpdateBeforeRepaint = true; | ||
554 | return; | ||
555 | } | ||
556 | //qDebug("KOTodoView::updateView() %x", this); | ||
544 | if ( isFlatDisplay ) { | 557 | if ( isFlatDisplay ) { |
545 | setAllFlat(); | 558 | setAllFlat(); |
546 | return; | 559 | return; |