summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp17
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
@@ -333,8 +333,9 @@ void KOQuickTodo::focusOutEvent(QFocusEvent *ev)
333 333
334KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : 334KOTodoView::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);
340 mName = QString ( name ); 341 mName = QString ( name );
@@ -532,16 +533,28 @@ void KOTodoView::jumpToDate ()
532// mActiveItem->todo()); 533// mActiveItem->todo());
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 537void KOTodoView::paintEvent(QPaintEvent * pevent)
538{
539 if ( mPendingUpdateBeforeRepaint ) {
540 updateView();
541 mPendingUpdateBeforeRepaint = false;
542 }
543 KOrg::BaseView::paintEvent( pevent);
544}
545 bool mPendingUpdateBeforeRepaint;
537void KOTodoView::updateView() 546void 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;
547 } 560 }