# HG changeset patch
# User Edouard Tisserant
# Date 1584613940 -3600
# Node ID 7beddc62a3889df782e45185bc55cd8e2298ba8a
# Parent 30cea13267b4b2953d973a1dea84ff182f92f069
SVGHMI: Exclude (again) sub-widgets of forEach widget from page-switch managed widget.
diff -r 30cea13267b4 -r 7beddc62a388 svghmi/detachable_pages.ysl2
--- a/svghmi/detachable_pages.ysl2 Thu Mar 19 09:57:26 2020 +0100
+++ b/svghmi/detachable_pages.ysl2 Thu Mar 19 11:32:20 2020 +0100
@@ -98,6 +98,10 @@
}
+const "forEach_widgets_ids", "$parsed_widgets/widget[@type = 'ForEach']/@id";
+const "forEach_widgets", "$hmi_elements[@id = $forEach_widgets_ids]";
+const "in_forEach_widget_ids", "func:refered_elements($forEach_widgets)[not(@id = $forEach_widgets_ids)]/@id";
+
template "svg:*", mode="page_desc" {
const "desc", "func:widget(@id)";
const "page", ".";
@@ -105,8 +109,7 @@
const "page_all_elements", "func:all_related_elements($page)";
- const "all_page_widgets","$hmi_elements[@id = $page_all_elements/@id and @id != $page/@id]";
-
+ const "all_page_widgets","$hmi_elements[@id = $page_all_elements/@id and @id != $page/@id and not(@id=$in_forEach_widget_ids)]";
const "page_relative_widgets",
"$all_page_widgets[func:is_descendant_path(func:widget(@id)/path/@value, $desc/path/@value)]";
@@ -143,8 +146,13 @@
}
function "debug_detachables" {
+ | DETACHABLES:
foreach "$detachable_elements"{
| «@id»
}
+ | In Foreach:
+ foreach "$in_forEach_widget_ids"{
+ | «.»
+ }
}
!debug_output_calls.append("debug_detachables")
diff -r 30cea13267b4 -r 7beddc62a388 svghmi/gen_index_xhtml.xslt
--- a/svghmi/gen_index_xhtml.xslt Thu Mar 19 09:57:26 2020 +0100
+++ b/svghmi/gen_index_xhtml.xslt Thu Mar 19 11:32:20 2020 +0100
@@ -323,12 +323,15 @@
+
+
+
-
+
"
@@ -416,12 +419,22 @@
+ DETACHABLES:
+
+ In Foreach:
+
+
+
+
+
+
+