Fixed unnecessary comparisons
This commit is contained in:
parent
74ab1ba874
commit
32b8005e0e
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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':
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user