summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index ba3bc05..4057ae0 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -57,12 +57,19 @@ int globalFlagBlockAgendaItemPaint = 1;
int globalFlagBlockAgendaItemUpdate = 1;
KOViewManager::KOViewManager( CalendarView *mainView ) :
QObject(), mMainView( mainView )
{
+
+ lastMode = 0;
+ lastCount = 0;
+ lastNDMode = false;
+ selecteddatescount = 0;
+ selecteddate = QDate ( 2000, 1, 1 );
+ baseCycleDate = QDate ( 2000, 1, 1 );
mCurrentView = 0;
flagResetViewChangeDate = 0;
mWhatsNextView = 0;
mTodoView = 0;
mAgendaView = 0;
mMonthView = 0;
@@ -110,16 +117,13 @@ void KOViewManager::readSettings(KConfig *config)
}
}
void KOViewManager::showDateView( int view, QDate date)
{
- static int lastMode = 0;
- static int lastCount = 0;
- static bool lastNDMode = false;
- static QDate lastDate;
+
//qDebug("date %d %s", view, date.toString().latin1());
if (view != 9)
lastMode = 0;
//qDebug("%d %d ", lastNDMode, mFlagShowNextxDays );
bool savemFlagShowNextxDays = mFlagShowNextxDays;
@@ -198,15 +202,13 @@ void KOViewManager::writeSettings(KConfig *config)
if (mTodoView) {
mTodoView->saveLayout(config,"Todo View");
}
}
void KOViewManager::showNextView()
{
- static int selecteddatescount = 0;
- static QDate selecteddate = QDate ( 2000, 1, 1 );
- static QDate baseCycleDate = QDate ( 2000, 1, 1 );
+
int newCount = mMainView->dateNavigator()->selectedDates().count();
if ( selecteddatescount != newCount && flagResetViewChangeDate == 0 ) {
flagResetViewChangeDate = 1;
}
if ( selecteddate != mMainView->dateNavigator()->selectedDates().first() )
flagResetViewChangeDate = 1;