-rw-r--r-- | korganizer/calendarview.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 28b17a5..31e103d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -368,2 +368,7 @@ void CalendarView::init() { + flag_blockConflict = false; + flag_blockScrollBar = false; + flag_checkFileFirsttime = true; + flag_clearallviewsEventDisplay = false; + flag_clearallviewsupdateView = false; mNextAlarmDateTime = QDateTime::currentDateTime(); @@ -663,5 +668,4 @@ void CalendarView::nextConflict( bool all, bool allday ) { - static bool block = false; - if ( block ) return; - block = true; + if ( flag_blockConflict ) return; + flag_blockConflict = true; QPtrList<Event> testlist = mCalendar->events(); @@ -742,3 +746,3 @@ void CalendarView::nextConflict( bool all, bool allday ) topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( cE->summary().left( 20 ) ).arg( cE2->summary().left( 20 ) ) ); - block = false; + flag_blockConflict = false; return; @@ -748,3 +752,3 @@ void CalendarView::nextConflict( bool all, bool allday ) //qDebug("No conflict found "); - block = false; + flag_blockConflict = false; return; @@ -782,5 +786,4 @@ void CalendarView::scrollBarValue(int val ) if ( QApplication::desktop()->width() < 800 ) return; - static bool block = false; - if ( block ) return; - block = true; + if ( flag_blockScrollBar ) return; + flag_blockScrollBar = true; int count = mNavigator->selectedDates().count(); @@ -796,3 +799,3 @@ void CalendarView::scrollBarValue(int val ) if ( stepdays == day ) { - block = false; + flag_blockScrollBar = false; return; @@ -802,3 +805,3 @@ void CalendarView::scrollBarValue(int val ) mNavigator->selectDates( d.addDays( stepdays-1) , count ); - block = false; + flag_blockScrollBar = false; #endif @@ -841,5 +844,4 @@ void CalendarView::checkFiles() } - static bool firstTime = true; - if ( firstTime ) { - firstTime = false; + if ( flag_checkFileFirsttime ) { + flag_checkFileFirsttime = false; QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); @@ -3018,7 +3020,6 @@ void CalendarView::changeEventDisplay(Event *which, int action) changeIncidenceDisplay((Incidence *)which, action); - static bool clearallviews = false; if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { - if ( clearallviews ) { + if ( flag_clearallviewsEventDisplay ) { clearAllViews(); - clearallviews = false; + flag_clearallviewsEventDisplay = false; } @@ -3026,3 +3027,3 @@ void CalendarView::changeEventDisplay(Event *which, int action) } - clearallviews = true; + flag_clearallviewsEventDisplay = true; mDateNavigator->updateView(); @@ -3179,7 +3180,6 @@ void CalendarView::updateView() { - static bool clearallviews = false; if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { - if ( clearallviews ) { + if ( flag_clearallviewsupdateView ) { clearAllViews(); - clearallviews = false; + flag_clearallviewsupdateView = false; } @@ -3187,3 +3187,3 @@ void CalendarView::updateView() } - clearallviews = true; + flag_clearallviewsupdateView = true; DateList tmpList = mNavigator->selectedDates(); |