From 809b1fa562f45269681ef26a0350c9b15f394ba8 Mon Sep 17 00:00:00 2001 From: Raphael Rosch Date: Mon, 13 May 2013 02:27:27 -0400 Subject: cleanup document option to clean up unused swatches Fixed bugs: - https://launchpad.net/bugs/1177888 (bzr r12333) --- src/sp-object.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 4d2a5a709..b5c93e792 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -455,13 +455,15 @@ void SPObject::setLabel(gchar const *label) void SPObject::requestOrphanCollection() { g_return_if_fail(document != NULL); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); // do not remove style or script elements (Bug #276244) if (SP_IS_STYLE_ELEM(this)) { // leave it } else if (SP_IS_SCRIPT(this)) { // leave it - } else if (SP_IS_PAINT_SERVER(this) && static_cast(this)->isSwatch() ) { + + } else if ((! prefs->getBool("/options/cleanupswatches/value", false)) && SP_IS_PAINT_SERVER(this) && static_cast(this)->isSwatch() ) { // leave it } else if (IS_COLORPROFILE(this)) { // leave it -- cgit v1.2.3