summaryrefslogtreecommitdiffstats
path: root/src/preferences.cpp
diff options
context:
space:
mode:
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.