From 32b8005e0ea0680f7c96d917b1f71378e1e4ab08 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 23 Jan 2016 18:45:54 -0500 Subject: [PATCH] Fixed unnecessary comparisons --- gramps/gui/clipboard.py | 2 +- gramps/gui/plug/quick/_quicktable.py | 2 +- gramps/gui/selectors/selectorfactory.py | 2 +- gramps/plugins/quickview/references.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gramps/gui/clipboard.py b/gramps/gui/clipboard.py index 6b4e9204d..895a31441 100644 --- a/gramps/gui/clipboard.py +++ b/gramps/gui/clipboard.py @@ -1644,7 +1644,7 @@ class MultiTreeView(Gtk.TreeView): self.uistate, [], ref) except WindowActiveError: pass - elif objclass in ['Media', 'Media']: + elif objclass == 'Media': ref = self.dbstate.db.get_object_from_handle(handle) if ref: try: diff --git a/gramps/gui/plug/quick/_quicktable.py b/gramps/gui/plug/quick/_quicktable.py index 07b5f6a55..dec8fe090 100644 --- a/gramps/gui/plug/quick/_quicktable.py +++ b/gramps/gui/plug/quick/_quicktable.py @@ -256,7 +256,7 @@ class QuickTable(SimpleTable): return True # handled event except WindowActiveError: pass - elif objclass in ['Media', 'Media']: + elif objclass == 'Media': ref = self.access.dbase.get_object_from_handle(handle) if ref: try: diff --git a/gramps/gui/selectors/selectorfactory.py b/gramps/gui/selectors/selectorfactory.py index cf93291e2..f4e031480 100644 --- a/gramps/gui/selectors/selectorfactory.py +++ b/gramps/gui/selectors/selectorfactory.py @@ -40,7 +40,7 @@ def SelectorFactory(classname): elif classname == 'Citation': from .selectcitation import SelectCitation cls = SelectCitation - elif classname in ['Media', 'Media']: + elif classname == 'Media': from .selectobject import SelectObject cls = SelectObject elif classname == 'Repository': diff --git a/gramps/plugins/quickview/references.py b/gramps/plugins/quickview/references.py index 59f4a76ee..b4d7e8c82 100644 --- a/gramps/plugins/quickview/references.py +++ b/gramps/plugins/quickview/references.py @@ -48,7 +48,7 @@ def get_ref(db, objclass, handle): ref = db.get_place_from_handle(handle) elif objclass == 'Note': ref = db.get_note_from_handle(handle) - elif objclass in ['Media', 'Media']: + elif objclass == 'Media': ref = db.get_object_from_handle(handle) else: ref = objclass