From d63c64fa08623b588db3a444016b951f4c65c093 Mon Sep 17 00:00:00 2001 From: hypercube <0hypercube@gmail.com> Date: Sat, 19 Jul 2025 12:09:57 +0100 Subject: [PATCH 1/2] Fix a single layer twice selected hiding the properties --- .../document/node_graph/node_graph_message_handler.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs b/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs index 40cfe18ca2..ddbaa35c1c 100644 --- a/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs +++ b/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs @@ -2234,6 +2234,12 @@ impl NodeGraphMessageHandler { } } + // The same layer/node may appear several times. Sort and dedup them for a stable ordering. + layers.sort(); + layers.dedup(); + nodes.sort(); + nodes.dedup(); + // Next, we decide what to display based on the number of layers and nodes selected match *layers.as_slice() { // If no layers are selected, show properties for all selected nodes From 8ad25aa7a3081881888abdb19ed449778dac8dba Mon Sep 17 00:00:00 2001 From: hypercube <0hypercube@gmail.com> Date: Sat, 19 Jul 2025 12:19:54 +0100 Subject: [PATCH 2/2] Comment that the same node appears several times --- editor/src/messages/portfolio/document/utility_types/nodes.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/src/messages/portfolio/document/utility_types/nodes.rs b/editor/src/messages/portfolio/document/utility_types/nodes.rs index 66369026b3..c120938a80 100644 --- a/editor/src/messages/portfolio/document/utility_types/nodes.rs +++ b/editor/src/messages/portfolio/document/utility_types/nodes.rs @@ -61,6 +61,7 @@ pub struct LayerPanelEntry { pub clippable: bool, } +/// IMPORTANT: the same node may appear multiple times. #[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize, PartialEq, Eq, specta::Type)] pub struct SelectedNodes(pub Vec); @@ -129,6 +130,7 @@ impl SelectedNodes { self.selected_layers(metadata).any(|selected| selected == layer) } + /// IMPORTANT: the same node may appear multiple times. pub fn selected_nodes(&self) -> impl Iterator + '_ { self.0.iter() }