[Getan-commits] [PATCH] Better multi-selection bugfix

Wald Commits scm-commit at wald.intevation.org
Wed May 9 13:38:36 CEST 2018


# HG changeset patch
# User Magnus Schieder <mschieder at intevation.de>
# Date 1525865884 -7200
# Node ID ca6d11781e2fdf7eba66deb0f0a3ccac348a3e8d
# Parent  3853cf82ca3ca8e8e4c646277810426658dddd16
Better multi-selection bugfix.

diff -r 3853cf82ca3c -r ca6d11781e2f getan/states.py
--- 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,


More information about the Getan-commits mailing list