From 97923e7530181ca817dd6fc8c7635f88524a068c Mon Sep 17 00:00:00 2001 From: prculley Date: Fri, 3 Jul 2020 15:34:44 -0500 Subject: [PATCH] Fix issue with attach source tool, results panel Fixes #11780 --- gramps/gui/plug/_windows.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gramps/gui/plug/_windows.py b/gramps/gui/plug/_windows.py index 067793198..923ee248f 100644 --- a/gramps/gui/plug/_windows.py +++ b/gramps/gui/plug/_windows.py @@ -814,9 +814,12 @@ class ToolManagedWindowBase(ManagedWindow): buffer_location = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT, int(event.x), int(event.y)) - iter = view.get_iter_at_location(*buffer_location) + _iter = view.get_iter_at_location(*buffer_location) + if isinstance(_iter, tuple): # Gtk changed api in recent versions + _iter = _iter[1] + for (tag, person_handle) in self.tags: - if iter.has_tag(tag): + if _iter.has_tag(tag): _window = view.get_window(Gtk.TextWindowType.TEXT) _window.set_cursor(self.link_cursor) return False # handle event further, if necessary @@ -827,9 +830,11 @@ class ToolManagedWindowBase(ManagedWindow): buffer_location = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT, int(event.x), int(event.y)) - iter = view.get_iter_at_location(*buffer_location) + _iter = view.get_iter_at_location(*buffer_location) + if isinstance(_iter, tuple): # Gtk changed api in recent versions + _iter = _iter[1] for (tag, person_handle) in self.tags: - if iter.has_tag(tag): + if _iter.has_tag(tag): person = self.db.get_person_from_handle(person_handle) if event.button == 1: if event.type == Gdk.EventType.DOUBLE_BUTTON_PRESS: