9700: Select Place search & Source/Citation hierarchy should NOT be expanded
This commit is contained in:
parent
5290062b24
commit
e23e40a698
@ -154,7 +154,7 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
|
||||
def share_button_clicked(self, obj):
|
||||
SelectCitation = SelectorFactory('Citation')
|
||||
|
||||
sel = SelectCitation(self.dbstate, self.uistate, self.track)
|
||||
sel = SelectCitation(self.dbstate, self.uistate, self.track, expand=False)
|
||||
object = sel.run()
|
||||
LOG.debug("selected object: %s" % object)
|
||||
# the object returned should either be a Source or a Citation
|
||||
|
@ -53,13 +53,14 @@ class BaseSelector(ManagedWindow):
|
||||
IMAGE = 2
|
||||
|
||||
def __init__(self, dbstate, uistate, track=[], filter=None, skip=set(),
|
||||
show_search_bar = True, default=None):
|
||||
show_search_bar = True, default=None, expand=True):
|
||||
"""Set up the dialog with the dbstate and uistate, track of parent
|
||||
windows for ManagedWindow, initial filter for the model, skip with
|
||||
set of handles to skip in the view, and search_bar to show the
|
||||
SearchBar at the top or not.
|
||||
"""
|
||||
self.filter = (2, filter, False)
|
||||
self.expand = expand
|
||||
|
||||
# Set window title, some selectors may set self.title in their __init__
|
||||
if not hasattr(self, 'title'):
|
||||
@ -288,6 +289,7 @@ class BaseSelector(ManagedWindow):
|
||||
|
||||
self.setupcols = False
|
||||
|
||||
if self.expand:
|
||||
if not (self.model.get_flags() & Gtk.TreeModelFlags.LIST_ONLY):
|
||||
self.tree.expand_all()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user