changeset 472:ca6d11781e2f

Better multi-selection bugfix.
author Magnus Schieder <mschieder@intevation.de>
date Wed, 09 May 2018 13:38:04 +0200
parents 3853cf82ca3c
children b9e30e556844
files getan/states.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/getan/states.py	Tue May 08 17:50:56 2018 +0200
+++ b/getan/states.py	Wed May 09 13:38:04 2018 +0200
@@ -480,8 +480,6 @@
             self.view.clear()
             self.set_next_state(self.projectlist_state)
             self.controller.view.set_focus(0)
-            # Deletes the selection of entries
-            self.view.selection = []
             return True
 
         if keys.get_enter() in key:
@@ -593,6 +591,8 @@
                 self.controller.delete_entries(self.entries)
                 self.renew_focus()
                 self.projectlist_state.view.update_rows()
+                # Deletes the selection of entries
+                self.view.selection = []
             self.view.set_footer_text("", 'entry_footer')
             # avoid creating new DefaultEntryListState and setting focus
             self.set_next_state(self.old_state)
@@ -654,6 +654,8 @@
             logger.debug("MoveEntryState: move selected entries.")
             self.controller.move_entries(self.entries, self.proj)
             self.renew_focus()
+            # Deletes the selection of entries
+            self.view.selection = []
             self.view.set_footer_text('', 'entry_footer')
             self.proj = None
             self.set_next_state(DefaultEntryListState(self.projectlist_state,
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)