summaryrefslogtreecommitdiffstats
path: root/src/ui/control-manager.cpp
diff options
context:
space:
mode:
authorAntonio Ospite <ao2@ao2.it>2017-10-22 17:10:24 +0000
committerAntonio Ospite <ao2@ao2.it>2017-10-23 08:40:50 +0000
commit68d1c505514fe4024c72df86d60a57bcb2b827c8 (patch)
tree6ce0a0eadccd2fd36c53517f5bd95a9191195166 /src/ui/control-manager.cpp
parentFix compilation on Ubuntu Trusty (diff)
downloadinkscape-68d1c505514fe4024c72df86d60a57bcb2b827c8.tar.gz
inkscape-68d1c505514fe4024c72df86d60a57bcb2b827c8.zip
Fix regression after r14761: handle size of selected nodes too big and sticky
In r14761 a bug was introduced in ControlManagerImpl::setSelected(), the fixed value _resize was used to set the final value of targetSize for the node instead of item->ctrlResize which is decided conditionally depending on the node state. https://bugs.launchpad.net/inkscape/+bug/1568644
Diffstat (limited to 'src/ui/control-manager.cpp')
-rw-r--r--src/ui/control-manager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/control-manager.cpp b/src/ui/control-manager.cpp
index d0285e467..d0106bfcd 100644
--- a/src/ui/control-manager.cpp
+++ b/src/ui/control-manager.cpp
@@ -330,10 +330,12 @@ void ControlManagerImpl::setSelected(SPCanvasItem *item, bool selected)
if (selected && _resizeOnSelect.count(item->ctrlType)) {
item->ctrlResize = 2;
+ } else {
+ item->ctrlResize = 0;
}
// TODO refresh colors
- double targetSize = _sizeTable[item->ctrlType][_size - 1] + _resize;
+ double targetSize = _sizeTable[item->ctrlType][_size - 1] + item->ctrlResize;
g_object_set(item, "size", targetSize, NULL);
}
}