diff options
| author | Raphael Rosch <launchpad@insaner.com> | 2013-05-13 06:27:27 +0000 |
|---|---|---|
| committer | insaner <launchpad@insaner.com> | 2013-05-13 06:27:27 +0000 |
| commit | 809b1fa562f45269681ef26a0350c9b15f394ba8 (patch) | |
| tree | 6b9eb54ca16f985032c79b616362209ed444f23c /src/sp-object.cpp | |
| parent | Moved icc selector members to internal helper. (diff) | |
| download | inkscape-809b1fa562f45269681ef26a0350c9b15f394ba8.tar.gz inkscape-809b1fa562f45269681ef26a0350c9b15f394ba8.zip | |
cleanup document option to clean up unused swatches
Fixed bugs:
- https://launchpad.net/bugs/1177888
(bzr r12333)
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<SPPaintServer*>(this)->isSwatch() ) { + + } else if ((! prefs->getBool("/options/cleanupswatches/value", false)) && SP_IS_PAINT_SERVER(this) && static_cast<SPPaintServer*>(this)->isSwatch() ) { // leave it } else if (IS_COLORPROFILE(this)) { // leave it |
