summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-08-22 08:44:52 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-08-22 08:44:52 +0000
commitef2594b0ca8105113100a3167a1e218f50137b20 (patch)
treec59ce8611526b082e006aeb90eb2b207c8df17e6 /src
parentAllow edit empty text nodes (diff)
downloadinkscape-ef2594b0ca8105113100a3167a1e218f50137b20.tar.gz
inkscape-ef2594b0ca8105113100a3167a1e218f50137b20.zip
Allow to store empty value XML node attributtes
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/attrdialog.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ui/dialog/attrdialog.cpp b/src/ui/dialog/attrdialog.cpp
index 994f2695c..7a699abab 100644
--- a/src/ui/dialog/attrdialog.cpp
+++ b/src/ui/dialog/attrdialog.cpp
@@ -336,10 +336,7 @@ void AttrDialog::onAttrChanged(Inkscape::XML::Node *repr, const gchar * name, co
break;
}
}
- if (new_value &&
- (strcmp(new_value, "") != 0 ||
- (repr->type() == Inkscape::XML::TEXT_NODE ||
- repr->type() == Inkscape::XML::COMMENT_NODE))) {
+ if (new_value) {
Gtk::TreeModel::Row row = *(_store->prepend());
row[_attrColumns._attributeName] = name;
row[_attrColumns._attributeValue] = new_value;
@@ -500,7 +497,8 @@ void AttrDialog::nameEdited (const Glib::ustring& path, const Glib::ustring& nam
row[_attrColumns._attributeName] = name;
grab_focus();
_updating = true;
- _repr->setAttribute(name.c_str(), value, false);
+ char const *valueto = value.c_str(); // this allow store empty values
+ _repr->setAttribute(name.c_str(), "", false);
_updating = false;
g_timeout_add(50, &sp_attrdialog_store_move_to_next, this);
}