summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.cpp
authorzautrix <zautrix>2005-04-01 18:10:09 (UTC)
committer zautrix <zautrix>2005-04-01 18:10:09 (UTC)
commitedc032c21ae3788d02a632ea8066e4ac5a4feedb (patch) (unidiff)
tree8e59c8dcf1cc3021694025627d36e152f7adc389 /korganizer/kodaymatrix.cpp
parent5d88f92b76a760f100384ea5fa6ed143088d19bb (diff)
downloadkdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.zip
kdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.tar.gz
kdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.tar.bz2
fixes
Diffstat (limited to 'korganizer/kodaymatrix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index dfc6af7..c55f7d7 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -288,7 +288,8 @@ void KODayMatrix::addSelectedDaysTo(DateList& selDays)
288} 288}
289 289
290bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end) 290bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end)
291{ 291{
292 mRedrawNeeded = true;
292 bool noSel = (mSelEnd == NOSELECTION && mSelStart == NOSELECTION ); 293 bool noSel = (mSelEnd == NOSELECTION && mSelStart == NOSELECTION );
293 mSelStart = startdate.daysTo(start); 294 mSelStart = startdate.daysTo(start);
294 if ( mSelStart < 0 ) 295 if ( mSelStart < 0 )
@@ -510,12 +511,14 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e)
510 mSelStart = getDayIndexFrom(e->x(), e->y()); 511 mSelStart = getDayIndexFrom(e->x(), e->y());
511 if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; 512 if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1;
512 mSelInit = mSelStart; 513 mSelInit = mSelStart;
513 mSelEnd = mSelStart; 514 mSelEnd = mSelStart;
515 mRedrawNeeded = true;
514 repaint(false); 516 repaint(false);
515} 517}
516 518
517void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) 519void KODayMatrix::mouseReleaseEvent (QMouseEvent* e)
518{ 520{
521 mRedrawNeeded = true;
519 if ( e->button() == LeftButton ) 522 if ( e->button() == LeftButton )
520 if ( ! mouseDown ) { 523 if ( ! mouseDown ) {
521 return; 524 return;
@@ -556,6 +559,7 @@ void KODayMatrix::mouseMoveEvent (QMouseEvent* e)
556 if ( ! mouseDown ) { 559 if ( ! mouseDown ) {
557 return; 560 return;
558 } 561 }
562 mRedrawNeeded = true;
559 int tmp = getDayIndexFrom(e->x(), e->y()); 563 int tmp = getDayIndexFrom(e->x(), e->y());
560 if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; 564 if (tmp > NUMDAYS-1) tmp=NUMDAYS-1;
561 565