Skip to content
Snippets Groups Projects
Commit 450e9149 authored by Dennis Baurichter's avatar Dennis Baurichter
Browse files

commit: Select all instances of same folder at once

When you manually select a folder and there are multiple instances of
the same one (same name, almost same id), always select all of them at
once.
parent fc7fcf37
No related branches found
No related tags found
No related merge requests found
......@@ -293,13 +293,22 @@ class FolderSelectActivity:
if item!=None:
if s.addItem(item):
q=search.util.SESearcher(item.display_title+item.id[:-1])
other_item_instances = [
v
for v in s._all_folders
if q.match(v.display_title+v.id[:-1]) ]
for oii in other_item_instances:
if oii!=item:
s.addItem(oii,silent=True)
s.clear_query()
return True
return default
## \brief Called internally to add a folder to the list of selected folders.
def addItem(s,item):
def addItem(s,item,silent=False):
if item in s.folders:
if not silent:
s.message=(
"Ordner %s ist bereits ausgewählt."%item.display_title,
s.attr_error)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment