[gedit-latex] Fix small error when enabling plugin
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] Fix small error when enabling plugin
- Date: Sat, 25 Feb 2012 15:24:53 +0000 (UTC)
commit 3170c7c855c2b37526e832b44a920907a42e1666
Author: John Stowers <john stowers gmail com>
Date: Sat Feb 25 15:50:03 2012 +0100
Fix small error when enabling plugin
latex/outline.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/latex/outline.py b/latex/outline.py
index 9db46a9..cc27852 100644
--- a/latex/outline.py
+++ b/latex/outline.py
@@ -163,12 +163,15 @@ class BaseOutlineView(PanelView):
self._view.expand_to_path(Gtk.TreePath.new_from_string(path))
def _on_cursor_changed(self, view):
- store, it = view.get_selection().get_selected()
+ selection = view.get_selection()
+ if not selection:
+ return
+
+ store, it = selection.get_selected()
if not it:
return
outline_node = store.get_value(it, 2)
-
self._on_node_selected(outline_node)
def _on_row_activated(self, view, path, column):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]