bug 9886; fix citation tree view quick report right click

Another HandleError issue;  Also, the Quick report that started was
actually the wrong one, due to a typo in the quickview.gpr.py.

I also rediscovered the bug 6352; and its relationship to quickreports.
This commit is contained in:
prculley 2017-01-18 09:47:33 -06:00
parent 1b01e9d74e
commit 3ac49dcb2c
2 changed files with 6 additions and 8 deletions

View File

@ -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 :

View File

@ -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"))
]