Part of #394: Identify Objects By shows and edits Layers names as XML IDs

This commit is contained in:
Fabio William Conceição
2026-10-14 05:13:15 +07:00
committed by bflatastic
parent cfa65a2148
commit 958c1dffe8
12 changed files with 213 additions and 61 deletions
+6
View File
@@ -978,6 +978,12 @@ impl Node {
_ => format!("<{}>", self.kind_label()),
}
}
/// [`Self::display_name`], or its XML id when Preferences › Units › Identify Objects By is XML ID.
pub fn identify_label(&self, xml_id: bool) -> String {
let name = self.display_name();
if xml_id { crate::xml_id::from_object_name(&name) } else { name }
}
/// Path data for path nodes.
pub fn path_data(&self) -> Option<&PathData> {
match &self.kind {