summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2003-05-13 23:05:10 (UTC)
committer umopapisdn <umopapisdn>2003-05-13 23:05:10 (UTC)
commit3cd39cd981c4691c559042075c5223d09c87007e (patch) (unidiff)
tree729ffa45a15a09f744860829e2ae0839871157f7
parent1e0e2f57472538bd880967ebe061c8f39a7e270b (diff)
downloadopie-3cd39cd981c4691c559042075c5223d09c87007e.zip
opie-3cd39cd981c4691c559042075c5223d09c87007e.tar.gz
opie-3cd39cd981c4691c559042075c5223d09c87007e.tar.bz2
Bugfix: (Bug #0000862) The red time marker should only be visible if we are showing today's date.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index 8232a51..0b213e9 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -505,27 +505,29 @@ void DateBookDay::relayoutPage( bool fromResize )
505 } 505 }
506 } 506 }
507 507
508 if (jumpToCurTime && this->date() == QDate::currentDate()) { 508 if (jumpToCurTime && this->date() == QDate::currentDate()) {
509 view->setContentsPos( 0, QTime::currentTime().hour() * view->rowHeight(0) ); //set listview to current hour 509 view->setContentsPos( 0, QTime::currentTime().hour() * view->rowHeight(0) ); //set listview to current hour
510 } else { 510 } else {
511 view->setContentsPos( 0, startTime * view->rowHeight(0) ); 511 view->setContentsPos( 0, startTime * view->rowHeight(0) );
512 } 512 }
513 } 513 }
514 514
515 timeMarker->setTime( QTime::currentTime() );//display timeMarker 515 timeMarker->setTime( QTime::currentTime() );//display timeMarker
516 timeMarker->raise(); //on top of all widgets 516 timeMarker->raise(); //on top of all widgets
517 if (this->date() == QDate::currentDate()) //only show timeMarker on current day 517 if (this->date() == QDate::currentDate()) { //only show timeMarker on current day
518 timeMarker->show(); else timeMarker->hide(); 518 timeMarker->show();
519 519 } else {
520 timeMarker->hide();
521 }
520 setUpdatesEnabled( TRUE ); 522 setUpdatesEnabled( TRUE );
521 return; 523 return;
522} 524}
523 525
524DateBookDayWidget *DateBookDay::intersects( const DateBookDayWidget *item, const QRect &geom ) 526DateBookDayWidget *DateBookDay::intersects( const DateBookDayWidget *item, const QRect &geom )
525{ 527{
526 int i = 0; 528 int i = 0;
527 DateBookDayWidget *w = widgetList.at(i); 529 DateBookDayWidget *w = widgetList.at(i);
528 int wCount = widgetList.count(); 530 int wCount = widgetList.count();
529 while ( i < wCount && w != item ) { 531 while ( i < wCount && w != item ) {
530 if ( w->geometry().intersects( geom ) ) { 532 if ( w->geometry().intersects( geom ) ) {
531 return w; 533 return w;