From d7a005e6c1a27d1084f30b940d54291a8d660f0e Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 07 Feb 2005 21:52:19 +0000 Subject: fixes --- (limited to 'korganizer/datenavigator.cpp') 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() void DateNavigator::selectWeek( int num ) { int year = mSelectedDates.first().year(); + QDate d = QDate ( year, 1,1); + while ( d.dayOfWeek() != 4 ) + d = d.addDays( 1 ); + selectWeek( d.addDays ( (num-1) *7 ) ); +} +void DateNavigator::selectWeekFromMonthView( int num ) +{ + int year = mSelectedDates.first().year(); if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 ) ++year; if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 ) -- cgit v0.9.0.2