From 7732f14a82b1ea4d3a2597cb77706ba380b49729 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 25 Jul 2010 17:34:37 -0700 Subject: [PATCH] Added preference to suppress auto-refresh of icon previews. --- src/preferences-skeleton.h | 1 + src/ui/dialog/icon-preview.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index cabb13d47..32f4b7c35 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -392,6 +392,7 @@ static char const preferences_skeleton[] = "\n" " desktop = Panel::getDesktop(); if ( this->desktop ) { docReplacedConn = this->desktop->connectDocumentReplaced(sigc::hide<0>(sigc::mem_fun(this, &IconPreviewPanel::setDocument))); - if (this->desktop->selection) { + if ( this->desktop->selection && Inkscape::Preferences::get()->getBool("/iconpreview/autoRefresh", true) ) { selChangedConn = desktop->selection->connectChanged(sigc::hide(sigc::mem_fun(this, &IconPreviewPanel::queueRefresh))); } } @@ -316,7 +316,9 @@ void IconPreviewPanel::setDocument( SPDocument *document ) this->document = document; if (this->document) { - docModConn = this->document->connectModified(sigc::hide(sigc::mem_fun(this, &IconPreviewPanel::queueRefresh))); + if ( Inkscape::Preferences::get()->getBool("/iconpreview/autoRefresh", true) ) { + docModConn = this->document->connectModified(sigc::hide(sigc::mem_fun(this, &IconPreviewPanel::queueRefresh))); + } queueRefresh(); } } -- 2.30.2