summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp11
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
@@ -514,6 +514,11 @@ void MonthViewCell::startUpdateCell()
mitem->setBlockRepaint( true );
mitem = (MonthViewItem *)mitem->next();
}
+ if ( mAvailItemList.count() > 20 ) {
+ mAvailItemList.setAutoDelete( true );
+ mAvailItemList.clear();
+ mAvailItemList.setAutoDelete( false );
+ }
/*
if ( !isVisible() ){
return;
@@ -817,14 +822,14 @@ void MonthViewCell::updateConfig( bool bigFont ) // = false
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);