summaryrefslogtreecommitdiffstats
path: root/src/dialogs/item-properties.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2011-12-30 11:01:48 +0000
committerKris <Kris.De.Gussem@hotmail.com>2011-12-30 11:01:48 +0000
commit8a2e93a39e369953e0fc16168d5a11c26a20f309 (patch)
tree1f631a631cfa2f485dd8c7b7325c337a4707acd0 /src/dialogs/item-properties.cpp
parentC++ification of item properties dialog (diff)
downloadinkscape-8a2e93a39e369953e0fc16168d5a11c26a20f309.tar.gz
inkscape-8a2e93a39e369953e0fc16168d5a11c26a20f309.zip
Item properties dialog: fix wasting resources when moving objects
(bzr r10806)
Diffstat (limited to 'src/dialogs/item-properties.cpp')
-rw-r--r--src/dialogs/item-properties.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp
index 8d468705c..55c292900 100644
--- a/src/dialogs/item-properties.cpp
+++ b/src/dialogs/item-properties.cpp
@@ -108,7 +108,8 @@ SPItemDialog::SPItemDialog (void) :
CBLock(_("L_ock"), 1),
BSet (_("_Set"), 1),
LabelInteractivity(_("_Interactivity"), 1),
- attrTable()
+ attrTable(),
+ CurrentItem(0)
{
gchar title[500];
sp_ui_dialog_title_string (Inkscape::Verb::get(SP_VERB_DIALOG_ITEM), title);
@@ -310,9 +311,17 @@ void SPItemDialog::widget_setup(void)
} else {
set_sensitive (true);
}
- blocked = true;
-
+
SPItem *item = selection->singleItem();
+ if (CurrentItem == item)
+ {
+ //otherwise we would end up wasting resources through the modify selection
+ //callback when moving an object (endlessly setting the labels and recreating attrTable)
+ return;
+ }
+ blocked = true;
+
+ CurrentItem = item;
CBLock.set_active (item->isLocked()); /* Sensitive */
CBHide.set_active(item->isExplicitlyHidden()); /* Hidden */