diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-01-18 09:46:44 +0000 |
|---|---|---|
| committer | Jabiertxof <jabier.arraiza@marker.es> | 2019-01-18 09:46:44 +0000 |
| commit | 1d76575e9ec50138d788f326b8ffa2cd41417fed (patch) | |
| tree | a44b69bee71fd6d9155d508472b79e0894d8ce38 /src/ui | |
| parent | Allow edit comment nodes with the XMLInspector (diff) | |
| download | inkscape-1d76575e9ec50138d788f326b8ffa2cd41417fed.tar.gz inkscape-1d76575e9ec50138d788f326b8ffa2cd41417fed.zip | |
Remove unwanted atributes from text and comment nodes
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/attrdialog.cpp | 14 |
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; + } } } |
