-rw-r--r-- | korganizer/komonthview.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 842f6eb..b819eec 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -71,13 +71,13 @@ private: KNoScrollListBox* _wid; }; KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) - : QListBox(parent, name) + : QListBox(parent, name, WRepaintNoErase) { #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); #endif mWT = new KNOWhatsThis(this); } @@ -379,30 +379,38 @@ void MonthViewCell::setHoliday( const QString &holiday ) void MonthViewCell::keyPressEvent ( QKeyEvent * e ) { e->ignore(); } +void MonthViewCell::clear() +{ + mItemList->clear(); + QApplication::removePostedEvents ( mItemList ); + QApplication::removePostedEvents ( mLabel ); + QApplication::removePostedEvents ( this ); +} void MonthViewCell::updateCell() { if ( !mMonthView->isUpdatePossible() ) return; - if ( !isVisible() ){ + /* + if ( !isVisible() ){ return; } + */ + // qDebug("MonthViewCell::updateCell() "); setPrimary( mDate.month()%2 ); setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); if ( mDate == QDate::currentDate() ) { mItemList->setLineWidth( 3 ); } else { mItemList->setLineWidth( 1 ); } mItemList->clear(); - - #ifdef DESKTOP_VERSION QToolTip::remove(this); #endif QString tipText(""); //qApp->processEvents(); if ( !mHolidayString.isEmpty() ) { @@ -563,16 +571,17 @@ void MonthViewCell::updateCell() mLabel->resize( mLabelBigSize ); text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); } else { mLabel->resize( mLabelSize ); text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); } + mLabel->setText( text ); resizeEvent( 0 ); // if ( isVisible()) - qApp->processEvents(); + //qApp->processEvents(); } void MonthViewCell::updateConfig() { setFont( KOPrefs::instance()->mMonthViewFont ); @@ -933,22 +942,23 @@ void KOMonthView::changeEventDisplay(Event *, int) // quick-and-dirty-hack gets the job done for right now. updateView(); } void KOMonthView::updateView() { - static int iii = 0; - ++iii; if ( !updatePossible ) return; - uint i; + //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); + int i; for( i = 0; i < mCells.count(); ++i ) { mCells[i]->updateCell(); } + //qDebug("KOMonthView::updateView() "); processSelectionChange(); + // qDebug("---------------------------------------------------------------------+ "); } void KOMonthView::resizeEvent(QResizeEvent * e) { computeLayout(); } |