summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kodaymatrix.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index dfc6af7..c55f7d7 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -284,16 +284,17 @@ void KODayMatrix::addSelectedDaysTo(DateList& selDays)
for (int i = i0; i <= mSelEnd; i++) {
selDays.append(days[i]);
}
}
}
bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end)
{
+ mRedrawNeeded = true;
bool noSel = (mSelEnd == NOSELECTION && mSelStart == NOSELECTION );
mSelStart = startdate.daysTo(start);
if ( mSelStart < 0 )
mSelStart = 0;
mSelEnd = startdate.daysTo(end);
if ( mSelEnd > NUMDAYS-1 )
mSelEnd = NUMDAYS-1;
if ( mSelEnd < 0 || mSelStart > NUMDAYS-1 ) {
@@ -506,21 +507,23 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e)
{
if ( e->button() == LeftButton )
mouseDown = true;
mSelStart = getDayIndexFrom(e->x(), e->y());
if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1;
mSelInit = mSelStart;
mSelEnd = mSelStart;
+ mRedrawNeeded = true;
repaint(false);
}
void KODayMatrix::mouseReleaseEvent (QMouseEvent* e)
{
+ mRedrawNeeded = true;
if ( e->button() == LeftButton )
if ( ! mouseDown ) {
return;
}
else
mouseDown = false;
int tmp = getDayIndexFrom(e->x(), e->y());
if (tmp > NUMDAYS-1) tmp=NUMDAYS-1;
@@ -551,16 +554,17 @@ void KODayMatrix::mouseReleaseEvent (QMouseEvent* e)
}
void KODayMatrix::mouseMoveEvent (QMouseEvent* e)
{
if ( ! mouseDown ) {
return;
}
+ mRedrawNeeded = true;
int tmp = getDayIndexFrom(e->x(), e->y());
if (tmp > NUMDAYS-1) tmp=NUMDAYS-1;
if (mSelInit > tmp) {
mSelEnd = mSelInit;
if (tmp != mSelStart) {
mSelStart = tmp;
repaint(false);