-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 | |||
@@ -288,7 +288,8 @@ void KODayMatrix::addSelectedDaysTo(DateList& selDays) | |||
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 ) |
@@ -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 | ||
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; |
@@ -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 | ||