SVGHMI: changes that should fix some corner cases about unlinking and discardable element that still didn't show until now.
authorEdouard Tisserant
Mon, 08 Nov 2021 14:03:21 +0100
changeset 3384 bd337d21f686
parent 3383 a3b8cfd89648
child 3385 18621ce81f5f
SVGHMI: changes that should fix some corner cases about unlinking and discardable element that still didn't show until now.
- list that would have been declared in some groups could have been discarded.
- elements to be unlinked were comuted based on filtering $hmi_elements, whereas $hmi_widget already filtered list
svghmi/detachable_pages.ysl2
svghmi/inline_svg.ysl2
--- a/svghmi/detachable_pages.ysl2	Thu Nov 04 12:03:43 2021 +0100
+++ b/svghmi/detachable_pages.ysl2	Mon Nov 08 14:03:21 2021 +0100
@@ -88,7 +88,7 @@
 const "required_page_elements",
     "func:required_elements($hmi_pages | $keypads)/ancestor-or-self::svg:*";
 
-const "required_list_elements", "func:refered_elements(($hmi_lists | $hmi_textlists)[@id = $required_page_elements/@id])";
+const "required_list_elements", "func:refered_elements(($hmi_lists | $hmi_textlists)[@id = $required_page_elements/@id])/ancestor-or-self::svg:*";
 
 const "required_elements", "$defs | $required_list_elements | $required_page_elements";
 
--- a/svghmi/inline_svg.ysl2	Thu Nov 04 12:03:43 2021 +0100
+++ b/svghmi/inline_svg.ysl2	Mon Nov 08 14:03:21 2021 +0100
@@ -56,7 +56,7 @@
 // TODO: narrow application of clone unlinking to active elements,
 //       while keeping static decoration cloned
 const "targets_not_to_unlink", "$hmi_lists/descendant-or-self::svg:*";
-const "to_unlink", "$hmi_elements[not(@id = $hmi_pages/@id)]/descendant-or-self::svg:use";
+const "to_unlink", "$hmi_widgets/descendant-or-self::svg:use";
 
 def "func:is_unlinkable" {
     param "targetid";