summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.cpp
Unidiff
Diffstat (limited to 'korganizer/kodaymatrix.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp17
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
@@ -110,6 +110,7 @@ KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const
110 QFrame(parent, name) 110 QFrame(parent, name)
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;
115 mouseDown = false; 116 mouseDown = false;
@@ -386,6 +387,7 @@ void KODayMatrix::updateViewTimed()
386 mHolidays[i] = QString::null; 387 mHolidays[i] = QString::null;
387 } 388 }
388 } 389 }
390 mRedrawNeeded = true;
389 if ( ! mPendingUpdateBeforeRepaint ) 391 if ( ! mPendingUpdateBeforeRepaint )
390 repaint(false); 392 repaint(false);
391} 393}
@@ -420,6 +422,7 @@ void KODayMatrix::updateView(QDate actdate)
420 startdate = actdate; 422 startdate = 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() );
425 if ( !isVisible() ) { 428 if ( !isVisible() ) {
@@ -428,7 +431,7 @@ void KODayMatrix::updateView(QDate actdate)
428#ifdef DESKTOP_VERSION 431#ifdef DESKTOP_VERSION
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 );
434 mUpdateTimer->start( 1200 ); 437 mUpdateTimer->start( 1200 );
@@ -678,7 +681,11 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
678 } 681 }
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());
684 691
@@ -927,9 +934,11 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
927 p.setFont(myFont); 934 p.setFont(myFont);
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
935// ---------------------------------------------------------------------------- 944// ----------------------------------------------------------------------------