summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.h
diff options
context:
space:
mode:
authorAntonio Ospite <ao2@ao2.it>2018-10-30 22:22:11 +0000
committerAntonio Ospite <ao2@ao2.it>2018-11-01 17:22:44 +0000
commitb8ed9d236dc560adc83245ce50e0630a0c482496 (patch)
tree6ed6e3f7c4de0f792b270071a641bd3ee15d79ad /src/knot-holder-entity.h
parentKnotHolder: remove stale comment (diff)
downloadinkscape-b8ed9d236dc560adc83245ce50e0630a0c482496.tar.gz
inkscape-b8ed9d236dc560adc83245ce50e0630a0c482496.zip
KnotHolder: fix knots selection status when a knot is clicked without Shift
When there are already selected knots, and _another_ knot is clicked without the Shift key pressed, the user would expects the previously selected knots to be unselected immediately, but this does not happen until the mouse button is released. Steps to replicate: 1. Change size of a rect using one corner. 2. Change the size using the opposite corner (without pressing Shift). Observed behavior: The first corner looks still selected during grab. Expected behavior: The first corner gets unelected as soon as the mouse button is pressed.. This happens because the knots selection status is not updated until the mouse button is released, i.e. in the click/ungrabbed signal handler. In order to have a more immediate feedback of the knot selection status, add a "mousedown" signal handler and update the selection status in there. While at it also remove the knot_holder local variable in knot_clicked_handler() which seems to be unnecessary.
Diffstat (limited to 'src/knot-holder-entity.h')
-rw-r--r--src/knot-holder-entity.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/knot-holder-entity.h b/src/knot-holder-entity.h
index e6efaa7e8..5e7868b70 100644
--- a/src/knot-holder-entity.h
+++ b/src/knot-holder-entity.h
@@ -87,6 +87,7 @@ public:
unsigned int _ungrab_handler_id;
private:
+ sigc::connection _mousedown_connection;
sigc::connection _moved_connection;
sigc::connection _click_connection;
sigc::connection _ungrabbed_connection;