Fix issue with attach source tool, results panel

Fixes #11780
This commit is contained in:
prculley 2020-07-03 15:34:44 -05:00 committed by Paul Culley
parent 75aabf570d
commit 97923e7530

View File

@ -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: