Use limit to expand tree

The screen switch to the form view if the limit is reached.

issue4901
review44641002
This commit is contained in:
Cédric Krier committed 2018-03-09 19:13:51 +01:00
1 parent afcc1a9425
commit 80f60b55f4
2 files changed
+5

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
* Use limit to expand tree
* Add keyword attribute to button tag
* Support field name on image tag
* Add option to check new version
+4
View File
@@ -653,6 +653,10 @@ class ViewTree(View):
def test_expand_row(self, widget, iter_, path):
model = widget.get_model()
if model.iter_n_children(iter_) > CONFIG['client.limit']:
self.screen.current_record = model.get_value(iter_, 0)
self.screen.switch_view('form')
return True
iter_ = model.iter_children(iter_)
if not iter_:
return False