[latexila] Fix little bug when clearing the build view



commit b8c677622f55548bbc90f40b7317703698090a46
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Wed Sep 5 00:19:04 2012 +0200

    Fix little bug when clearing the build view

 src/build_view.vala |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/build_view.vala b/src/build_view.vala
index 3d6c0c0..f1adafc 100644
--- a/src/build_view.vala
+++ b/src/build_view.vala
@@ -246,7 +246,18 @@ public class BuildView : TreeView
 
     public void clear ()
     {
+        // No selection allowed when clearing the TreeStore. Else, all the rows are
+        // selected, and if there are warnings or errors, the program jumps to all
+        // warnings/errors one by one. It's fun, but after four or five times, it becomes
+        // less fun because our text cursor moves all the time ;)
+        // Another means would have been to remove and re-add the select function, but I
+        // prefer this hack, shorter :)
+        TreeSelection select = this.get_selection ();
+
+        select.set_mode (SelectionMode.NONE);
         _store.clear ();
+        select.set_mode (SelectionMode.SINGLE);
+
         this.columns_autosize ();
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]