summaryrefslogtreecommitdiffabout
path: root/korganizer/datenavigator.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/datenavigator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index 3156b2b..d2824de 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -197,34 +197,33 @@ void DateNavigator::selectWorkWeek( const QDate &d )
}
selectDates( firstDate, 5 );
}
void DateNavigator::selectTodayMonth()
{
QDate date = QDate::currentDate().addDays( 1-QDate::currentDate().day() );
selectDates( date , date.daysInMonth ());
}
void DateNavigator::selectToday()
{
QDate d = QDate::currentDate();
int dateCount = mSelectedDates.count();
-
- if ( dateCount == 5 ) selectWorkWeek( d );
+ if ( dateCount == 5 && d.dayOfWeek() < 6 ) selectWorkWeek( d );
else if ( dateCount == 7 ) selectWeek( d );
else selectDates( d, dateCount );
}
void DateNavigator::selectPreviousYear()
{
QDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, -1 );
selectWeekByDay( weekDay, firstSelected );
}
void DateNavigator::selectPreviousMonth()
{
QDate firstSelected = mSelectedDates.first();