summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c65abb)
raw | patch | inline | side by side (parent: 7c65abb)
author | speare <speare@users.sourceforge.net> | |
Sun, 8 Mar 2009 15:29:31 +0000 (15:29 +0000) | ||
committer | speare <speare@users.sourceforge.net> | |
Sun, 8 Mar 2009 15:29:31 +0000 (15:29 +0000) |
src/widgets/sp-xmlview-tree.cpp | patch | blob | history |
index 698ee81ee7cd7cd1a6a15c3fcae94746dac9a168..b757123b5c6f6cf25cab1869a08d1a30f3d2c564 100644 (file)
@@ -268,14 +268,21 @@ element_attr_changed (Inkscape::XML::Node * repr, const gchar * key, const gchar
{
NodeData * data;
gchar *label;
+ const gchar *layer;
data = (NodeData *) ptr;
if (data->tree->blocked) return;
- if (strcmp (key, "id")) return;
+ if (0 != strcmp (key, "id") && 0 != strcmp (key, "inkscape:label"))
+ return;
- if (new_value) {
+ new_value = repr->attribute("id");
+ layer = repr->attribute("inkscape:label");
+
+ if (new_value && layer) {
+ label = g_strdup_printf ("<%s id=\"%s\" inkscape:label=\"%s\">", repr->name(), new_value, layer);
+ } else if (new_value) {
label = g_strdup_printf ("<%s id=\"%s\">", repr->name(), new_value);
} else {
label = g_strdup_printf ("<%s>", repr->name());