From 1d76575e9ec50138d788f326b8ffa2cd41417fed Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Fri, 18 Jan 2019 10:46:44 +0100 Subject: Remove unwanted atributes from text and comment nodes --- src/ui/dialog/attrdialog.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src') 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; + } } } -- cgit v1.2.3