-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 82437d8..99402c4 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -209,7 +209,11 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) #endif QListView::contentsMousePressEvent(e); } - +void KOTodoListView::paintEvent(QPaintEvent* e) +{ + emit paintNeeded(); + QListView::paintEvent( e); +} void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) { @@ -501,6 +505,8 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : SLOT( itemStateChanged( QListViewItem * ) ) ); connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), SLOT( itemStateChanged( QListViewItem * ) ) ); + connect( mTodoListView, SIGNAL( paintNeeded() ), + SLOT( paintNeeded()) ); #if 0 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), @@ -534,6 +540,13 @@ void KOTodoView::jumpToDate () // if ( mActiveItem->todo()->hasDueDate() ) // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); } +void KOTodoView::paintNeeded() +{ + if ( mPendingUpdateBeforeRepaint ) { + updateView(); + mPendingUpdateBeforeRepaint = false; + } +} void KOTodoView::paintEvent(QPaintEvent * pevent) { if ( mPendingUpdateBeforeRepaint ) { @@ -542,7 +555,7 @@ void KOTodoView::paintEvent(QPaintEvent * pevent) } KOrg::BaseView::paintEvent( pevent); } - bool mPendingUpdateBeforeRepaint; + void KOTodoView::updateView() { pendingSubtodo = 0; |