[gedit-plugins/gnome-3-0] synctex: call goto_line on an idle when	doing sync_source on non-open file.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gedit-plugins/gnome-3-0] synctex: call goto_line on an idle when	doing sync_source on non-open file.
- Date: Tue,  5 Jul 2011 14:05:09 +0000 (UTC)
commit 5c9656ced5bf6a991174294cdec2580a3fae9d5f
Author: Josà Aliste <jaliste src gnome org>
Date:   Tue Jul 5 16:04:58 2011 +0200
    synctex: call goto_line on an idle when doing sync_source on non-open file.
    
    Doing the goto_line on the 'loaded' signal handler is not enough
    and the scroll_to_cursor does not work, so we
    install a call to goto_line on the idle instead to ensure scroll_to_cursor
    does work.
 plugins/synctex/synctex/synctex.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/synctex/synctex/synctex.py b/plugins/synctex/synctex/synctex.py
index fdac231..7a0daac 100644
--- a/plugins/synctex/synctex/synctex.py
+++ b/plugins/synctex/synctex/synctex.py
@@ -179,7 +179,7 @@ class SynctexViewHelper:
         self._window.present_with_time (time)
 
     def goto_line_after_load(self, a, line, time):
-        self.goto_line(line, time)
+        GObject.idle_add(lambda : self.goto_line(line, time))
         self._doc.disconnect(self._goto_handler)
 
     def sync_view(self, time):
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]