author | zautrix <zautrix> | 2005-04-01 18:10:09 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-01 18:10:09 (UTC) |
commit | edc032c21ae3788d02a632ea8066e4ac5a4feedb (patch) (unidiff) | |
tree | 8e59c8dcf1cc3021694025627d36e152f7adc389 /korganizer/kodaymatrix.cpp | |
parent | 5d88f92b76a760f100384ea5fa6ed143088d19bb (diff) | |
download | kdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.zip kdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.tar.gz kdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.tar.bz2 |
fixes
-rw-r--r-- | korganizer/kodaymatrix.cpp | 8 |
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 | |||
@@ -287,9 +287,10 @@ void KODayMatrix::addSelectedDaysTo(DateList& selDays) | |||
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
290 | bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end) | 290 | bool 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 ) |
295 | mSelStart = 0; | 296 | mSelStart = 0; |
@@ -509,14 +510,16 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e) | |||
509 | mouseDown = true; | 510 | mouseDown = true; |
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 | ||
517 | void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) | 519 | void 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; |
522 | } | 525 | } |
@@ -555,8 +558,9 @@ void KODayMatrix::mouseMoveEvent (QMouseEvent* e) | |||
555 | { | 558 | { |
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 | ||
562 | if (mSelInit > tmp) { | 566 | if (mSelInit > tmp) { |