From 8a283ff37655980a508d71da52c2c53c37a34582 Mon Sep 17 00:00:00 2001 From: Josip Date: Mon, 28 Mar 2016 14:53:17 -0700 Subject: [PATCH] 9335: Gramps has experienced an unexpected error --- gramps/gui/widgets/grampletpane.py | 4 ++++ gramps/gui/widgets/styledtexteditor.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index d50ed6e2c..a3be62c77 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -597,6 +597,8 @@ class GuiGramplet(object): int(event.x), int(event.y)) iter = view.get_iter_at_location(*buffer_location) + if isinstance(iter, tuple): + iter = iter[1] cursor = self.standard_cursor ttip = None for (tag, link_type, handle, tooltip) in self._tags: @@ -619,6 +621,8 @@ class GuiGramplet(object): int(event.x), int(event.y)) iter = view.get_iter_at_location(*buffer_location) + if isinstance(iter, tuple): + iter = iter[1] for (tag, link_type, handle, tooltip) in self._tags: if iter.has_tag(tag): if link_type == 'Person': diff --git a/gramps/gui/widgets/styledtexteditor.py b/gramps/gui/widgets/styledtexteditor.py index f8854ebbc..de12de673 100644 --- a/gramps/gui/widgets/styledtexteditor.py +++ b/gramps/gui/widgets/styledtexteditor.py @@ -286,6 +286,8 @@ class StyledTextEditor(Gtk.TextView): x, y = self.window_to_buffer_coords(Gtk.TextWindowType.WIDGET, int(event.x), int(event.y)) iter_at_location = self.get_iter_at_location(x, y) + if isinstance(iter_at_location, tuple): + iter_at_location = iter_at_location[1] self.match = self.textbuffer.match_check(iter_at_location.get_offset()) tooltip = None if not self.match: