summaryrefslogtreecommitdiffabout
path: root/korganizer/datenavigator.cpp
Unidiff
Diffstat (limited to 'korganizer/datenavigator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigator.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index d2824de..8b7c993 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -155,6 +155,14 @@ void DateNavigator::selectWeek()
155void DateNavigator::selectWeek( int num ) 155void DateNavigator::selectWeek( int num )
156{ 156{
157 int year = mSelectedDates.first().year(); 157 int year = mSelectedDates.first().year();
158 QDate d = QDate ( year, 1,1);
159 while ( d.dayOfWeek() != 4 )
160 d = d.addDays( 1 );
161 selectWeek( d.addDays ( (num-1) *7 ) );
162}
163void DateNavigator::selectWeekFromMonthView( int num )
164{
165 int year = mSelectedDates.first().year();
158 if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 ) 166 if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 )
159 ++year; 167 ++year;
160 if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 ) 168 if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 )