From e79e325b28b9f1479cc0420692a7604eeabd33b2 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Thu, 28 Jan 2016 19:51:09 +0100 Subject: [PATCH] 9094: Double-clicking on a source in the citation gramplet causes exception --- gramps/plugins/gramplet/citations.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/gramplet/citations.py b/gramps/plugins/gramplet/citations.py index b40087d85..d2bb12569 100644 --- a/gramps/plugins/gramplet/citations.py +++ b/gramps/plugins/gramplet/citations.py @@ -243,7 +243,11 @@ class Citations(Gramplet, DbGUIElement): model, iter_ = treeview.get_selection().get_selected() if iter_: handle = model.get_value(iter_, 0) - if len(str(model.get_path(iter_))) == 1: + # bug 9094. + # str(model.get_path(iter_)) return something like NNN:MMM + # So if we have only NNN, it's a node + path = str(model.get_path(iter_)) + if path.find(':') == -1: # we don't have ':' in the returned string. self.edit_source(handle) else: self.edit_citation(handle)