summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/tableview.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp
index 3daf370..d980a24 100644
--- a/core/pim/todo/tableview.cpp
+++ b/core/pim/todo/tableview.cpp
@@ -598,2 +598,8 @@ void TableView::keyPressEvent( QKeyEvent* event) {
}
+
+ if ( sorted().count() < 1 ) {
+ QTable::keyPressEvent( event );
+ return;
+ }
+
int row = currentRow();
@@ -602,5 +608,8 @@ void TableView::keyPressEvent( QKeyEvent* event) {
char key = ::toupper( event->ascii() );
- /* let QTable also handle the d later */
- if ( key == 'D' )
+ /* let QTable also handle the d letter */
+ if ( key == 'D' ) {
+ event->accept();
removeQuery( sorted().uidAt( row ) );
+ return;
+ }
@@ -622,3 +631,3 @@ void TableView::keyPressEvent( QKeyEvent* event) {
}
-
+ event->accept();
break;