Merge pull request #331 from prculley/bug9886
bug 9886; fix citation tree view quick report right click
This commit is contained in:
commit
88e98fcd92
@ -257,14 +257,12 @@ def run_report(dbstate, uistate, category, handle, pdata, container=None,
|
||||
elif category == CATEGORY_QR_CITATION :
|
||||
obj = dbstate.db.get_citation_from_handle(handle)
|
||||
elif category == CATEGORY_QR_SOURCE_OR_CITATION :
|
||||
source = dbstate.db.get_source_from_handle(handle)
|
||||
citation = dbstate.db.get_citation_from_handle(handle)
|
||||
if (not source and not citation) or (source and citation):
|
||||
raise ValueError("selection must be either source or citation")
|
||||
if citation:
|
||||
obj = citation
|
||||
if dbstate.db.has_source_handle(handle):
|
||||
obj = dbstate.db.get_source_from_handle(handle)
|
||||
elif dbstate.db.has_citation_handle(handle):
|
||||
obj = dbstate.db.get_citation_from_handle(handle)
|
||||
else:
|
||||
obj = source
|
||||
raise ValueError("selection must be either source or citation")
|
||||
elif category == CATEGORY_QR_PLACE :
|
||||
obj = dbstate.db.get_place_from_handle(handle)
|
||||
elif category == CATEGORY_QR_MEDIA :
|
||||
|
@ -207,7 +207,7 @@ refitems = [(CATEGORY_QR_PERSON, 'person', _("Person")),
|
||||
(CATEGORY_QR_MEDIA, 'media', _("Media")),
|
||||
(CATEGORY_QR_NOTE, 'note', _("Note")),
|
||||
(CATEGORY_QR_CITATION, 'citation', _("Citation")),
|
||||
(CATEGORY_QR_SOURCE_OR_CITATION, 'source or citation',
|
||||
(CATEGORY_QR_SOURCE_OR_CITATION, 'source_or_citation',
|
||||
_("Source or Citation"))
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user