From 19117c36082531a00df461260f917d1207edde1f Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Wed, 11 Aug 2010 08:43:24 +0200 Subject: Clear pointers in the snapmanager if they're no longer needed. (bzr r9697) --- src/pencil-context.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/pencil-context.cpp') diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 9f9c187f3..845f22a21 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -290,6 +290,7 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve m.freeSnapReturnByRef(p, Inkscape::SNAPSOURCE_NODE_HANDLE); } } + m.unSetup(); pc->sa = anchor; spdc_set_startpoint(pc, p); ret = TRUE; @@ -416,6 +417,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)); + m.unSetup(); } break; } -- cgit v1.2.3 From 184ca395b0e06c2569640f8bb325f28917cf04e3 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 22 Aug 2010 09:33:26 +0200 Subject: Snapmanager in pencil tool: setup() must be followed by unSetup() to clear pointers (bzr r9720) --- src/pencil-context.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/pencil-context.cpp') diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 845f22a21..5d89c9715 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -263,13 +263,14 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve default: /* Set first point of sequence */ SnapManager &m = desktop->namedview->snap_manager; - m.setup(desktop); 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); + m.unSetup(); ret = true; break; } @@ -277,7 +278,7 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve 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 @@ -289,8 +290,8 @@ 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); } + m.unSetup(); } - m.unSetup(); pc->sa = anchor; spdc_set_startpoint(pc, p); ret = TRUE; -- cgit v1.2.3 From 144819c918dc761641c3cb5a490205fb73194ee3 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 17 Nov 2010 13:12:56 +1100 Subject: Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in all 1074 Vim modelines. The reason for this is that (a) setting the encoding isn't nice, and (b) Vim 7.3 (with modeline enabled) disallows it and pops up an error whenever you open any file with it ("invalid modeline"). Also corrected five deviant modestrings: * src/ui/widget/dock.cpp and src/ui/widget/dock.h: missing colon at the end * src/ui/dialog/tile.cpp: removed gratuitous second colon at the end * src/helper/units-test.h: removed gratuitous space before a colon * share/extensions/export_gimp_palette.py: missing textwidth=99 That's my geekiest commit yet. (bzr r9900) --- src/pencil-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pencil-context.cpp') diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 5d89c9715..0717724de 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -953,4 +953,4 @@ fit_and_split(SPPencilContext *pc) 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 : -- cgit v1.2.3