summaryrefslogtreecommitdiffstats
path: root/src/knot.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2009-04-20 20:43:21 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2009-04-20 20:43:21 +0000
commit18a2c53c584ba14f3c33ea8be8e59ab74832dc7c (patch)
treef80065cea5d0ccd9e6ed91627ae3603b1f3bc657 /src/knot.cpp
parentKorean translation update by yongdoria (diff)
downloadinkscape-18a2c53c584ba14f3c33ea8be8e59ab74832dc7c.tar.gz
inkscape-18a2c53c584ba14f3c33ea8be8e59ab74832dc7c.zip
Correctly trigger any pending snap events when the mouse button is released after dragging a knot (i.e. after scaling/stretching/etc). The code was already there but executed in the wrong order
(bzr r7747)
Diffstat (limited to 'src/knot.cpp')
-rw-r--r--src/knot.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/knot.cpp b/src/knot.cpp
index 5c821f909..1ac5d887b 100644
--- a/src/knot.cpp
+++ b/src/knot.cpp
@@ -325,18 +325,20 @@ static int sp_knot_handler(SPCanvasItem */*item*/, GdkEvent *event, SPKnot *knot
}
break;
case GDK_BUTTON_RELEASE:
- if (event->button.button == 1 && !knot->desktop->event_context->space_panning) {
- if (snap_delay_temporarily_active) {
+ if (event->button.button == 1 && !knot->desktop->event_context->space_panning) {
+ // If we have any pending snap event, then invoke it now
+ if (knot->desktop->event_context->_delayed_snap_event) {
+ sp_event_context_snap_watchdog_callback(knot->desktop->event_context->_delayed_snap_event);
+ }
+
+ // now we can safely close the snapping window
+ if (snap_delay_temporarily_active) {
if (knot->desktop->event_context->_snap_window_open == true) {
sp_event_context_snap_window_closed(knot->desktop->event_context);
}
snap_delay_temporarily_active = false;
}
- if (knot->desktop->event_context->_delayed_snap_event) {
- sp_event_context_snap_watchdog_callback(knot->desktop->event_context->_delayed_snap_event);
- }
-
knot->pressure = 0;
if (transform_escaped) {
transform_escaped = false;