Commit 61d69940 authored by Vincent Pelletier's avatar Vincent Pelletier

ListBox: Remove domain tree condition when disabled.

When changing listbox display mode (ex: from domain tree to flat list),
remove domain tree from selection, so filtering comming from domain tree
does not apply.
Requested-by: Thierry's avatarThierry Brettnacher <tb@nexedi.com>
parent e18266a2
...@@ -1929,7 +1929,6 @@ class ListBoxRenderer: ...@@ -1929,7 +1929,6 @@ class ListBoxRenderer:
domain_found = 0 domain_found = 0
if self.isDomainTreeMode(): if self.isDomainTreeMode():
domain_selection = self.getDomainSelection() domain_selection = self.getDomainSelection()
selection.edit(domain=domain_selection)
if domain_selection is not None: if domain_selection is not None:
for k, d in domain_selection.asDomainDict().iteritems(): for k, d in domain_selection.asDomainDict().iteritems():
if k is not None: if k is not None:
...@@ -1958,6 +1957,8 @@ class ListBoxRenderer: ...@@ -1958,6 +1957,8 @@ class ListBoxRenderer:
domain_context = context domain_context = context
domain_list_method = list_method domain_list_method = list_method
domain_count_method = count_method domain_count_method = count_method
domain_selection = None
selection.edit(domain=domain_selection)
if list_method is not None: if list_method is not None:
if count_method is not None and not selection.invert_mode and max_lines > 0: if count_method is not None and not selection.invert_mode and max_lines > 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment