diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index 9f9c187f37cb6adf1d4e76338222ad2b4d09462b..a873eb6fcb9a84e383c68e006e1ee2040b13a7e9 100644 (file)
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
#include "document.h"
#include "desktop-style.h"
#include "macros.h"
#include "document.h"
#include "desktop-style.h"
#include "macros.h"
+#include "display/sp-canvas.h"
#include "display/curve.h"
#include "livarot/Path.h"
#include "display/curve.h"
#include "livarot/Path.h"
@@ -263,13 +264,14 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve
default:
/* Set first point of sequence */
SnapManager &m = desktop->namedview->snap_manager;
default:
/* Set first point of sequence */
SnapManager &m = desktop->namedview->snap_manager;
- m.setup(desktop);
if (bevent.state & GDK_CONTROL_MASK) {
if (bevent.state & GDK_CONTROL_MASK) {
+ m.setup(desktop);
if (!(bevent.state & GDK_SHIFT_MASK)) {
m.freeSnapReturnByRef(p, Inkscape::SNAPSOURCE_NODE_HANDLE);
}
spdc_create_single_dot(event_context, p, "/tools/freehand/pencil", bevent.state);
if (!(bevent.state & GDK_SHIFT_MASK)) {
m.freeSnapReturnByRef(p, Inkscape::SNAPSOURCE_NODE_HANDLE);
}
spdc_create_single_dot(event_context, p, "/tools/freehand/pencil", bevent.state);
+ m.unSetup();
ret = true;
break;
}
ret = true;
break;
}
@@ -277,7 +279,7 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve
p = anchor->dp;
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Continuing selected path"));
} else {
p = anchor->dp;
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Continuing selected path"));
} else {
-
+ m.setup(desktop);
if (!(bevent.state & GDK_SHIFT_MASK)) {
// This is the first click of a new curve; deselect item so that
// this curve is not combined with it (unless it is drawn from its
if (!(bevent.state & GDK_SHIFT_MASK)) {
// This is the first click of a new curve; deselect item so that
// this curve is not combined with it (unless it is drawn from its
@@ -289,6 +291,7 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Appending to selected path"));
m.freeSnapReturnByRef(p, Inkscape::SNAPSOURCE_NODE_HANDLE);
}
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Appending to selected path"));
m.freeSnapReturnByRef(p, Inkscape::SNAPSOURCE_NODE_HANDLE);
}
+ m.unSetup();
}
pc->sa = anchor;
spdc_set_startpoint(pc, p);
}
pc->sa = anchor;
spdc_set_startpoint(pc, p);
@@ -416,6 +419,7 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev
SnapManager &m = dt->namedview->snap_manager;
m.setup(dt);
m.preSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_NODE_HANDLE));
SnapManager &m = dt->namedview->snap_manager;
m.setup(dt);
m.preSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_NODE_HANDLE));
+ m.unSetup();
}
break;
}
}
break;
}
fill-column:99
End:
*/
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :