Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 3f6e29b..d09f484 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -129,2 +129,7 @@ void DateNavigatorContainer::selectDates( const DateList &dateList ) setBaseDates(); + if ( mExtraViews.count() ) { + KDateNavigator *view = mExtraViews.at( 0 ); + view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); + view->dayMatrix()->repaint(); + } } @@ -139,5 +144,7 @@ void DateNavigatorContainer::setBaseDates() KDateNavigator *n; + bool doRepaint = false; // skip first repaint for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { baseDate = baseDate.addDays( baseDate.daysInMonth () ); - n->setBaseDate( baseDate ); + n->setBaseDate( baseDate, doRepaint ); + doRepaint = true; } @@ -145,3 +152,3 @@ void DateNavigatorContainer::setBaseDates() -void DateNavigatorContainer::resizeEvent( QResizeEvent * ) +void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) { @@ -154,4 +161,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * ) #endif - - QSize minSize = mNavigatorView->minimumSizeHint(); + QSize minSize = mNavigatorView->yourSizeHint(); @@ -161,2 +167,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * ) int horizontalCount = size().width() / minSize.width(); + //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() ); //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount ); @@ -165,3 +172,6 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * ) uint count = horizontalCount * verticalCount; - if ( count == 0 ) return; + if ( count == 0 ) { + mNavigatorView->resize( minSize ); + return; + } |