8625: Cannot open Citation references from Clip Board

This commit is contained in:
Josip 2015-06-12 16:15:40 +02:00
parent a5074e9478
commit 6511a80b47

View File

@ -1579,7 +1579,8 @@ class MultiTreeView(Gtk.TreeView):
def edit_obj(self, objclass, handle): def edit_obj(self, objclass, handle):
from .editors import (EditPerson, EditEvent, EditFamily, EditSource, from .editors import (EditPerson, EditEvent, EditFamily, EditSource,
EditPlace, EditRepository, EditNote, EditMedia) EditPlace, EditRepository, EditNote, EditMedia,
EditCitation)
if objclass == 'Person': if objclass == 'Person':
person = self.dbstate.db.get_person_from_handle(handle) person = self.dbstate.db.get_person_from_handle(handle)
if person: if person:
@ -1644,6 +1645,15 @@ class MultiTreeView(Gtk.TreeView):
self.uistate, [], ref) self.uistate, [], ref)
except WindowActiveError: except WindowActiveError:
pass pass
elif objclass == 'Citation':
ref = self.dbstate.db.get_citation_from_handle(handle)
if ref:
try:
EditCitation(self.dbstate,
self.uistate, [], ref)
except WindowActiveError:
pass
def short(val,size=60): def short(val,size=60):
if len(val) > size: if len(val) > size: