-rw-r--r-- | korganizer/kodaymatrix.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index d543aaf..dfc6af7 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -111,4 +111,5 @@ KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const | |||
111 | #endif | 111 | #endif |
112 | { | 112 | { |
113 | mRedrawNeeded = true; | ||
113 | mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); | 114 | mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); |
114 | mPendingUpdateBeforeRepaint = false; | 115 | mPendingUpdateBeforeRepaint = false; |
@@ -387,4 +388,5 @@ void KODayMatrix::updateViewTimed() | |||
387 | } | 388 | } |
388 | } | 389 | } |
390 | mRedrawNeeded = true; | ||
389 | if ( ! mPendingUpdateBeforeRepaint ) | 391 | if ( ! mPendingUpdateBeforeRepaint ) |
390 | repaint(false); | 392 | repaint(false); |
@@ -421,4 +423,5 @@ void KODayMatrix::updateView(QDate actdate) | |||
421 | mDayChanged = true; | 423 | mDayChanged = true; |
422 | recalculateToday(); | 424 | recalculateToday(); |
425 | mRedrawNeeded = true; | ||
423 | } | 426 | } |
424 | //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); | 427 | //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); |
@@ -429,5 +432,5 @@ void KODayMatrix::updateView(QDate actdate) | |||
429 | //mRepaintTimer->start( 100 ); | 432 | //mRepaintTimer->start( 100 ); |
430 | //updateViewTimed(); | 433 | //updateViewTimed(); |
431 | mUpdateTimer->start( 20 ); | 434 | mUpdateTimer->start( 50 ); |
432 | #else | 435 | #else |
433 | mRepaintTimer->start( 350 ); | 436 | mRepaintTimer->start( 350 ); |
@@ -679,5 +682,9 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) | |||
679 | if ( myPix.width() != width() || myPix.height()!=height() ) { | 682 | if ( myPix.width() != width() || myPix.height()!=height() ) { |
680 | myPix.resize(size() ); | 683 | myPix.resize(size() ); |
684 | mRedrawNeeded = true; | ||
681 | } | 685 | } |
686 | |||
687 | if ( mRedrawNeeded ) { | ||
688 | //qDebug("REDRAW "); | ||
682 | QPainter p(&myPix); | 689 | QPainter p(&myPix); |
683 | p.setFont(font()); | 690 | p.setFont(font()); |
@@ -928,7 +935,9 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) | |||
928 | } | 935 | } |
929 | } | 936 | } |
930 | int off = 0;//xyOff; | 937 | } else { |
931 | bitBlt (this, off, off, &myPix, 0 ,0,width(), height() ,CopyROP); | 938 | //qDebug("NO redraw "); |
932 | //qDebug("ffffffffff %d ", off); | 939 | } |
940 | bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); | ||
941 | mRedrawNeeded = false; | ||
933 | } | 942 | } |
934 | 943 | ||