-rw-r--r-- | korganizer/komonthview.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 12233ee..9085775 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -511,12 +511,17 @@ void MonthViewCell::startUpdateCell() return; MonthViewItem *mitem = (MonthViewItem*) firstItem (); while ( mitem ) { mitem->setBlockRepaint( true ); mitem = (MonthViewItem *)mitem->next(); } + if ( mAvailItemList.count() > 20 ) { + mAvailItemList.setAutoDelete( true ); + mAvailItemList.clear(); + mAvailItemList.setAutoDelete( false ); + } /* if ( !isVisible() ){ return; } */ // qDebug("MonthViewCell::updateCell() "); @@ -814,20 +819,20 @@ void MonthViewCell::updateConfig( bool bigFont ) // = false //updateCell(); } void MonthViewCell::enableScrollBars( bool enabled ) { if ( enabled ) { - QListBoxItem *fi = firstItem (); if (fi ) { int ihei = fi->height( this ); int hei = numRows () * ihei; - if ( hei < height() - horizontalScrollBar()->height () ) + if ( hei < height() - horizontalScrollBar()->height () ) { setVScrollBarMode(QScrollView::AlwaysOff); - else + } + else setVScrollBarMode(QScrollView::Auto); if ( ihei *3 > height() ) setHScrollBarMode(QScrollView::AlwaysOff); else setHScrollBarMode(QScrollView::Auto); } else { |