From 28b1db78e053990f0b5d0eebc24f638205ee4240 Mon Sep 17 00:00:00 2001 From: Josip Date: Mon, 28 Mar 2016 14:52:58 -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 e7782b392..c6ca1a0ec 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -595,6 +595,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: @@ -617,6 +619,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 875a5b37c..f67f84329 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: