9094: Double-clicking on a source in the citation gramplet causes exception
This commit is contained in:
parent
638cd571d4
commit
e79e325b28
@ -243,7 +243,11 @@ class Citations(Gramplet, DbGUIElement):
|
|||||||
model, iter_ = treeview.get_selection().get_selected()
|
model, iter_ = treeview.get_selection().get_selected()
|
||||||
if iter_:
|
if iter_:
|
||||||
handle = model.get_value(iter_, 0)
|
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)
|
self.edit_source(handle)
|
||||||
else:
|
else:
|
||||||
self.edit_citation(handle)
|
self.edit_citation(handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user