author | zautrix <zautrix> | 2005-01-22 10:18:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-22 10:18:16 (UTC) |
commit | 6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452 (patch) (unidiff) | |
tree | 006248579ca44ad2e0c1a67db55b1a8013180ed7 /microkde | |
parent | b715b109b70b8cd24a2d9da1d4863c44d79fb2a4 (diff) | |
download | kdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.zip kdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.tar.gz kdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.tar.bz2 |
some small fixes
-rw-r--r-- | microkde/kdatetbl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp index 146291b..508ce31 100644 --- a/microkde/kdatetbl.cpp +++ b/microkde/kdatetbl.cpp | |||
@@ -344,6 +344,7 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e) | |||
344 | return; | 344 | return; |
345 | } | 345 | } |
346 | pos=7*(row-1)+col+1; | 346 | pos=7*(row-1)+col+1; |
347 | #if 0 | ||
347 | if(pos+dayoff<=firstday) | 348 | if(pos+dayoff<=firstday) |
348 | { // this day is in the previous month | 349 | { // this day is in the previous month |
349 | KNotifyClient::beep(); | 350 | KNotifyClient::beep(); |
@@ -354,8 +355,10 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e) | |||
354 | KNotifyClient::beep(); | 355 | KNotifyClient::beep(); |
355 | return; | 356 | return; |
356 | } | 357 | } |
358 | #endif | ||
357 | temp=firstday+date.day()-dayoff-1; | 359 | temp=firstday+date.day()-dayoff-1; |
358 | setDate(QDate(date.year(), date.month(), pos-firstday+dayoff)); | 360 | QDate da = QDate(date.year(), date.month(),1); |
361 | setDate(da.addDays( pos-firstday+dayoff-1)); | ||
359 | updateCell(temp/7+1, temp%7); // Update the previously selected cell | 362 | updateCell(temp/7+1, temp%7); // Update the previously selected cell |
360 | updateCell(row, col); // Update the selected cell | 363 | updateCell(row, col); // Update the selected cell |
361 | // assert(QDate(date.year(), date.month(), pos-firstday+dayoff).isValid()); | 364 | // assert(QDate(date.year(), date.month(), pos-firstday+dayoff).isValid()); |