Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 5cdaa83..5941337 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -185,51 +185,55 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) if ( horizontalCount == 0 ) horizontalCount = 1; if ( verticalCount == 0 ) verticalCount = 1; fontchange = true; count = horizontalCount * verticalCount; } else { if ( mNavigatorView->fontChanged() ) { fontchange = true; fo = KOPrefs::instance()->mDateNavigatorFont; mNavigatorView->changeFont( fo ); mNavigatorView->unsetFontChanged(); } } while ( count > ( mExtraViews.count() + 1 ) ) { KDateNavigator *n = new KDateNavigator( this ); n->setMonthSignalOffset ( mExtraViews.count()+1 ); mExtraViews.append( n ); n->setCalendar( mCalendar ); setBaseDates(); connectNavigatorView( n ); n->show(); } - - while ( count < ( mExtraViews.count() + 1 ) ) { - mExtraViews.removeLast(); + int iii = 0; + while ( iii < ( mExtraViews.count() ) ) { + if ( iii < count-1 ) + mExtraViews.at( iii )->show(); + else + mExtraViews.at( iii )->hide(); + ++iii; } if ( fontchange ) { //mNavigatorView->changeFont( fo ); uint i; for( i = 0; i < mExtraViews.count(); ++i ) { KDateNavigator *view = mExtraViews.at( i ); view->changeFont( fo ); } } mHorizontalCount = horizontalCount; mVerticalCount = verticalCount; } int height = size().height() / verticalCount; int width = size().width() / horizontalCount; NavigatorBar *bar = mNavigatorView->navigatorBar(); if ( horizontalCount > 1 ) bar->showButtons( true, false ); else bar->showButtons( true, true ); mNavigatorView->setGeometry(0, 0, width, height ); for( uint i = 0; i < mExtraViews.count(); ++i ) { int x = ( i + 1 ) % horizontalCount; int y = ( i + 1 ) / horizontalCount; |