summaryrefslogtreecommitdiffstats
path: root/src/preferences.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-11-30 12:11:42 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-11-30 12:11:42 +0000
commitb2b5252360d16fa3a1dd8cc172a2b7a09ba716e4 (patch)
tree3da0e10d6e335e10eaa2f3ec145b948e7efa87e2 /src/preferences.cpp
parentFix for 430301 : core dump exporting to non existing folder (diff)
downloadinkscape-b2b5252360d16fa3a1dd8cc172a2b7a09ba716e4.tar.gz
inkscape-b2b5252360d16fa3a1dd8cc172a2b7a09ba716e4.zip
Fix for 255792 : Calligraphy tool presets management
(bzr r11916)
Diffstat (limited to 'src/preferences.cpp')
-rw-r--r--src/preferences.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/preferences.cpp b/src/preferences.cpp
index 1f985a629..3f12c4f64 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -504,6 +504,17 @@ void Preferences::mergeStyle(Glib::ustring const &pref_path, SPCSSAttr *style)
sp_repr_css_attr_unref(current);
}
+/**
+ * Remove an entry
+ * Make sure observers have been removed before calling
+ */
+void Preferences::remove(Glib::ustring const &pref_path)
+{
+ Inkscape::XML::Node *node = _getNode(pref_path, false);
+ if (node && node->parent()) {
+ node->parent()->removeChild(node);
+ }
+}
/**
* Class that holds additional information for registered Observers.