[gedit-latex] outline: Fix crash on save due to invalid pointer.
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] outline: Fix crash on save due to invalid pointer.
- Date: Sun, 24 Jul 2011 02:14:26 +0000 (UTC)
commit 4d017c0ef308ffc400564f49c58fbe4d183df3f9
Author: Josà Aliste <jaliste src gnome org>
Date: Sat Jul 23 22:03:44 2011 -0400
outline: Fix crash on save due to invalid pointer.
Save the expanded paths in the outline as a list of
strings instead of a list of Gtk.TreePath
Fixes bug #654403.
latex/outline.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/latex/outline.py b/latex/outline.py
index f781f6e..3861af0 100644
--- a/latex/outline.py
+++ b/latex/outline.py
@@ -147,7 +147,7 @@ class BaseOutlineView(PanelView):
"""
Mapping function for saving the current expand state
"""
- self._expanded_paths.append(path)
+ self._expanded_paths.append(path.to_string())
def _restore_state(self):
"""
@@ -157,9 +157,7 @@ class BaseOutlineView(PanelView):
if self._expanded_paths:
for path in self._expanded_paths:
- self._view.expand_to_path(path)
-# else:
-# self._view.expand_to_path((0,))
+ self._view.expand_to_path(Gtk.TreePath.new_from_string(path))
def _on_cursor_changed(self, view):
store, it = view.get_selection().get_selected()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]