Parse child of group tags at the end

This allows to preserve the order of the state widgets in the form which is
important when evaluating the emptiness of a group

Closes #13622
This commit is contained in:
Nicolas Évrard committed 2024-11-30 10:24:52 +01:00
1 parent e0eb7390ed
commit ffeeb1cdfe
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -236,7 +236,6 @@ function eval_pyson(value){
var group = new Sao.View.Form.Container(
Number(node.getAttribute('col') || 4));
this.view.containers.push(group);
this.parse_child(node, group);
if (attributes.xalign === undefined) {
attributes.xalign = 0.5;
@@ -261,6 +260,9 @@ function eval_pyson(value){
this.view.state_widgets.push(widget);
this.container.add(widget, attributes);
// Parse the children at the end to preserve the order of the state
// widgets
this.parse_child(node, group);
},
_parse_hpaned: function(node, attributes) {
this._parse_paned(node, attributes, 'horizontal');
@@ -382,7 +382,6 @@ class FormXMLViewParser(XMLViewParser):
group = Container.constructor(
int(attributes.get('col', 4)),
attributes.get('homogeneous', False))
self.parse_child(node, group)
if 'name' in attributes and attributes['name'] == self.exclude_field:
self.container.add(None, attributes)
@@ -406,6 +405,9 @@ class FormXMLViewParser(XMLViewParser):
bool(attributes.get('yexpand'))))
self.view.state_widgets.append(widget)
self.container.add(widget, attributes)
# Parse the children at the end to preserve the order of the state
# widgets
self.parse_child(node, group)
def _parse_hpaned(self, node, attributes):
self._parse_paned(node, attributes, Gtk.HPaned)