From f144b4c425637d932efd2a48da81565640f4f851 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Thu, 28 Jan 2016 19:54:52 +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 3f9a31efe..3e20bc041 100644 --- a/gramps/plugins/gramplet/citations.py +++ b/gramps/plugins/gramplet/citations.py @@ -245,7 +245,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)