Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 9506768..b147427 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -118,33 +118,38 @@ void DateNavigatorContainer::updateView() void DateNavigatorContainer::updateConfig() { mNavigatorView->updateConfig(); KDateNavigator *n; for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { n->updateConfig(); } } void DateNavigatorContainer::selectDates( const DateList &dateList ) { mNavigatorView->selectDates( dateList ); setBaseDates(); if ( mExtraViews.count() ) { KDateNavigator *view = mExtraViews.at( 0 ); view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); - view->dayMatrix()->repaint( false ); + view->dayMatrix()->repaint( false ); + if ( mExtraViews.count() > 1 ) { + KDateNavigator *view = mExtraViews.at( 1 ); + view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); + view->dayMatrix()->repaint( false ); + } } } void DateNavigatorContainer::setBaseDates() { KCal::DateList dateList = mNavigatorView->selectedDates(); if ( dateList.isEmpty() ) { kdError() << "DateNavigatorContainer::selectDates() empty list." << endl; } QDate baseDate = dateList.first(); KDateNavigator *n; bool doRepaint = false; // skip first repaint for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 ); n->setBaseDate( baseDate, doRepaint ); doRepaint = true; |