[Getan-commits] [PATCH] Multiple selection, Removes the selected entry, not the last one added

Wald Commits scm-commit at wald.intevation.org
Wed May 9 17:01:25 CEST 2018


# HG changeset patch
# User Magnus Schieder <mschieder at intevation.de>
# Date 1525877852 -7200
# Node ID 1855b1ef283416cd749e019d102f218dc753ce5d
# Parent  0d831a9f547ba5f3ce57f5fffe1a8b7616986191
Multiple selection, Removes the selected entry, not the last one added.

 * Update TODO
 * Update doc/old_issues.txt
 * Update CHANGES

diff -r 0d831a9f547b -r 1855b1ef2834 CHANGES
--- a/CHANGES	Wed May 09 16:12:16 2018 +0200
+++ b/CHANGES	Wed May 09 16:57:32 2018 +0200
@@ -3,10 +3,16 @@
  * Better fix for the multiple selection bug.
    The multiple selection is deleted when deleting or moving is confirmed or
    when switching to projects.
+   Removes the selected entry, not the last one added.
+   More information can be found in ./doc/old_issues.txt
+   -20180214 Magnus Schieder
+   Patch by Magnus Schieder
 
  * Better control of the walker.
    If you move entries and switch back to the projects you get to the project
    you were in. Before, you always got the first project.
+   More information can be found in ./doc/old_issues.txt
+   -20180214 Magnus Schieder
    If the entries are empty, the walker will automatically switches to the
    projects.
    Patch by Magnus Schieder
diff -r 0d831a9f547b -r 1855b1ef2834 TODO
--- a/TODO	Wed May 09 16:12:16 2018 +0200
+++ b/TODO	Wed May 09 16:57:32 2018 +0200
@@ -25,42 +25,6 @@
     So ent1 and ent2 should not highlighted anymore.
 
 
-- Bug 2.0
-  20180214 Magnus Schieder
-  Reproduced with getan2.1 and getan2.3dev1
-
-  4) Switch to the entries from the project pro2 with tab.
-  5) Mark with return and arrow keys ent7 and ent8.
-  6) Press m, then 3 and then y to move ent7 and ent8.
-  7) Go back to the projects with tab.
-
-  Expectation:
-    The focus is on pro2.
-    The entries of pro2 are displayed.
-
-  Result:
-    The focus is on pro1.
-    The entries of pro2 are displayed (ent9)
-
-
-- Bug 3.0
-  20180214 Magnus Schieder
-  Reproduced with getan2.1 and getan2.3dev1
-
-  4) Switch to the entries from the project pro1 with tab.
-  5) Mark with return and arrow keys ent1, ent2, ent3, ent4 and ent5.
-  6) Delete the mark of ent3.
-  7) Press m, then 3 and then y to move ent1, ent2, ent4 and ent5.
-
-  Expectation:
-    ent1, ent2, ent4 and ent5 are moved to.
-
-  Result:
-    ent1, ent2, ent3 and ent4 were moved to pro3.
-    ent5 stays in pro1.
-    (The last marked entry stays in its project)
-
-
 20170709 BER: Give scripts/getan-eval.py a more specific name and add
   it as a script to be installed.
 
diff -r 0d831a9f547b -r 1855b1ef2834 doc/old_issues.txt
--- a/doc/old_issues.txt	Wed May 09 16:12:16 2018 +0200
+++ b/doc/old_issues.txt	Wed May 09 16:57:32 2018 +0200
@@ -1,3 +1,37 @@
+20180214 Magnus Schieder
+  Reproduced with getan2.1 and getan2.3dev1
+
+  4) Switch to the entries from the project pro2 with tab.
+  5) Mark with return and arrow keys ent7 and ent8.
+  6) Press m, then 3 and then y to move ent7 and ent8.
+  7) Go back to the projects with tab.
+
+  Expectation:
+    The focus is on pro2.
+    The entries of pro2 are displayed.
+
+  Result:
+    The focus is on pro1.
+    The entries of pro2 are displayed (ent9)
+
+
+20180214 Magnus Schieder
+  Reproduced with getan2.1 and getan2.3dev1
+
+  4) Switch to the entries from the project pro1 with tab.
+  5) Mark with return and arrow keys ent1, ent2, ent3, ent4 and ent5.
+  6) Delete the mark of ent3.
+  7) Press m, then 3 and then y to move ent1, ent2, ent4 and ent5.
+
+  Expectation:
+    ent1, ent2, ent4 and ent5 are moved to.
+
+  Result:
+    ent1, ent2, ent3 and ent4 were moved to pro3.
+    ent5 stays in pro1.
+    (The last marked entry stays in its project)
+
+
 20180118 BER There should be an indication which entries are shown
     when being in the right pane. When you use tab to go to the entries,
     it cannot be seen anymore in which project I am.
diff -r 0d831a9f547b -r 1855b1ef2834 getan/view.py
--- a/getan/view.py	Wed May 09 16:12:16 2018 +0200
+++ b/getan/view.py	Wed May 09 16:57:32 2018 +0200
@@ -132,7 +132,7 @@
             self.selection.append(node)
         else:
             if node in self.selection:
-                self.selection.pop()
+                self.selection.remove(node)
         logger.debug("ListWidget: all selected rows: %r" % self.selection)
         return node
 


More information about the Getan-commits mailing list