author | zautrix <zautrix> | 2005-01-31 08:46:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-31 08:46:08 (UTC) |
commit | 9b13105b4cc0ede4ca2d01a3d998fdb90bf67b58 (patch) (side-by-side diff) | |
tree | db736dd6d3615d46db1bf1d32965a5872d3cc0d4 /korganizer/kodaymatrix.cpp | |
parent | f7663a4c854d217bcb4f828a3ebb69cc40d0dd7c (diff) | |
download | kdepimpi-9b13105b4cc0ede4ca2d01a3d998fdb90bf67b58.zip kdepimpi-9b13105b4cc0ede4ca2d01a3d998fdb90bf67b58.tar.gz kdepimpi-9b13105b4cc0ede4ca2d01a3d998fdb90bf67b58.tar.bz2 |
fix
-rw-r--r-- | korganizer/kodaymatrix.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index be5a775..9812321 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -263,68 +263,69 @@ void KODayMatrix::updateView(QDate actdate) //qDebug("date not valid "); return; } mDayChanged = false; //flag to indicate if the starting day of the matrix has changed by this call //mDayChanged = false; // if a new startdate is to be set then apply Cornelius's calculation // of the first day to be shown if (actdate != startdate) { // reset index of selection according to shift of starting date from startdate to actdate if (mSelStart != NOSELECTION) { int tmp = actdate.daysTo(startdate); //kdDebug() << "Shift of Selection1: " << mSelStart << " - " << mSelEnd << " -> " << tmp << "(" << offset << ")" << endl; // shift selection if new one would be visible at least partly ! if (mSelStart+tmp < NUMDAYS && mSelEnd+tmp >= 0) { // nested if is required for next X display pushed from a different month - correction required // otherwise, for month forward and backward, it must be avoided if( mSelStart > NUMDAYS || mSelStart < 0 ) mSelStart = mSelStart + tmp; if( mSelEnd > NUMDAYS || mSelEnd < 0 ) mSelEnd = mSelEnd + tmp; } } startdate = actdate; mDayChanged = true; recalculateToday(); } //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); if ( !isVisible() ) { mPendingUpdateBeforeRepaint = true; } else { - mRepaintTimer->start( 250 ); #ifdef DESKTOP_VERSION + mRepaintTimer->start( 250 ); mUpdateTimer->start( 2000 ); #else + mRepaintTimer->start( 350 ); mUpdateTimer->start( 4000 ); #endif } } const QDate& KODayMatrix::getDate(int offset) { if (offset < 0 || offset > NUMDAYS-1) { qDebug("Wrong offset2 "); return days[0]; } return days[offset]; } QString KODayMatrix::getHolidayLabel(int offset) { if (offset < 0 || offset > NUMDAYS-1) { qDebug("Wrong offset1 "); return 0; } return mHolidays[offset]; } int KODayMatrix::getDayIndexFrom(int x, int y) { return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ? 6 - x/daysize.width() : x/daysize.width()); } // ---------------------------------------------------------------------------- // M O U S E E V E N T H A N D L I N G // ---------------------------------------------------------------------------- |