changeset 102:cd2456d0589e

Add single entry deletion Pressing d without selecting an entry will delete the entry under the current focus.
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 12 Sep 2011 14:07:27 +0200
parents df98b84d22f9
children 9546120437c7
files getan/states.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/getan/states.py	Mon Sep 12 14:06:19 2011 +0200
+++ b/getan/states.py	Mon Sep 12 14:07:27 2011 +0200
@@ -403,6 +403,10 @@
             if self.view.selection:
                 return DeleteEntryState(self.projectlist_state,
                                         self.controller, self.view)
+            else:
+                entry = self.view.item_in_focus()
+                return DeleteEntryState(self.projectlist_state,
+                                        self.controller, self.view, [entry])
         if 'm' in key:
             if self.view.selection:
                 return MoveEntryState(self.projectlist_state,
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)