summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index c125ce9..f983ff9 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1618,47 +1618,53 @@ void KOMonthView::processSelectionChange()
}
}
void KOMonthView::clearSelection()
{
if ( mSelectedCell ) {
mSelectedCell->deselect();
mSelectedCell = 0;
}
}
void KOMonthView::keyPressEvent ( QKeyEvent * e )
{
//qDebug("KOMonthView::keyPressEvent ");
switch(e->key()) {
case Key_Up:
{
- emit prevMonth();
- if ( mShowWeekView )
+ if ( mShowWeekView ) {
mCellsW[0]->setFocus();
- else
+ emit selectWeekNum ( currentWeek() - 1 );
+ }
+ else {
mCells[0]->setFocus();
+ emit prevMonth();
+ }
}
e->accept();
break;
case Key_Down:
{
- emit nextMonth();
- if ( mShowWeekView )
+ if ( mShowWeekView ) {
mCellsW[0]->setFocus();
- else
+ emit selectWeekNum ( currentWeek() +1);
+ }
+ else {
mCells[0]->setFocus();
+ emit nextMonth();
+ }
}
e->accept();
break;
case Key_Return:
case Key_Enter:
{
selectInternalWeekNum ( currentWeek() );
}
e->accept();
break;
default:
e->ignore();
break;
}
}