[gedit-latex] Don't force a cursor action when selecting a node



commit 34542364508a040a283e1d641b17df960da3f646
Author: Sven (Sbte) <svenb linux gmail com>
Date:   Sun May 6 21:34:08 2012 +0200

    Don't force a cursor action when selecting a node
    
    This removes some hacked way of selecting treeview items and fixes random selections upon saving files

 latex/outline.py |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/latex/outline.py b/latex/outline.py
index cc27852..2972978 100644
--- a/latex/outline.py
+++ b/latex/outline.py
@@ -184,15 +184,13 @@ class BaseOutlineView(PanelView):
         """
         Expand a path and select the last node
         """
-        # disconnect from 'cursor-changed'
-        self._view.disconnect(self._cursor_changed_id)
+        selection = self._view.get_selection()
+        if not selection:
+            return
 
         # select path
         self._view.expand_to_path(path)
-        self._view.set_cursor(path, None, False)
-
-        # connect to 'cursor-changed' again
-        self._cursor_changed_id = self._view.connect("cursor-changed", self._on_cursor_changed)
+        selection.select_path(path)
 
     #
     # methods to be overridden by the subclass



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