summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/attrdialog.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-01-18 09:46:44 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-01-18 09:46:44 +0000
commit1d76575e9ec50138d788f326b8ffa2cd41417fed (patch)
treea44b69bee71fd6d9155d508472b79e0894d8ce38 /src/ui/dialog/attrdialog.cpp
parentAllow edit comment nodes with the XMLInspector (diff)
downloadinkscape-1d76575e9ec50138d788f326b8ffa2cd41417fed.tar.gz
inkscape-1d76575e9ec50138d788f326b8ffa2cd41417fed.zip
Remove unwanted atributes from text and comment nodes
Diffstat (limited to 'src/ui/dialog/attrdialog.cpp')
-rw-r--r--src/ui/dialog/attrdialog.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ui/dialog/attrdialog.cpp b/src/ui/dialog/attrdialog.cpp
index bd480dcb7..22a443e10 100644
--- a/src/ui/dialog/attrdialog.cpp
+++ b/src/ui/dialog/attrdialog.cpp
@@ -234,10 +234,16 @@ void AttrDialog::onAttrChanged(Inkscape::XML::Node *repr, const gchar * name, co
}
}
}
- if(new_value) {
- Gtk::TreeModel::Row row = *(_store->append());
- row[_attrColumns._attributeName] = name;
- row[_attrColumns._attributeValue] = new_value;
+ if (new_value) {
+ if ((repr->type() == Inkscape::XML::TEXT_NODE || repr->type() == Inkscape::XML::COMMENT_NODE) &&
+ name != "content")
+ {
+ return;
+ } else {
+ Gtk::TreeModel::Row row = *(_store->append());
+ row[_attrColumns._attributeName] = name;
+ row[_attrColumns._attributeValue] = new_value;
+ }
}
}