summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore 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
@@ -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;