From c0f89481948a0006402d8c0ed05237bbb1ea5fd5 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Thu, 3 Sep 2009 16:22:43 +0000 Subject: [PATCH] restore ctrl+click dots in pencil --- src/pencil-context.cpp | 13 ++++++++++++- src/ui/dialog/inkscape-preferences.cpp | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 31b7441d4..d6050ba04 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -256,6 +256,14 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop); + if (bevent.state & GDK_CONTROL_MASK) { + if (!(bevent.state & GDK_SHIFT_MASK)) { + m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, p, Inkscape::SNAPSOURCE_HANDLE); + } + spdc_create_single_dot(event_context, p, "/tools/freehand/pencil", bevent.state); + ret = true; + break; + } if (anchor) { p = anchor->dp; desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Continuing selected path")); @@ -415,7 +423,10 @@ pencil_handle_button_release(SPPencilContext *const pc, GdkEventButton const &re case SP_PENCIL_CONTEXT_IDLE: /* Releasing button in idle mode means single click */ /* We have already set up start point/anchor in button_press */ - pc->state = SP_PENCIL_CONTEXT_ADDLINE; + if (!(revent.state & GDK_CONTROL_MASK)) { + // Ctrl+click creates a single point so only set context in ADDLINE mode when Ctrl isn't pressed + pc->state = SP_PENCIL_CONTEXT_ADDLINE; + } ret = TRUE; break; case SP_PENCIL_CONTEXT_ADDLINE: diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index b75fdc6c2..9b6d9e084 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -486,6 +486,7 @@ void InkscapePreferences::initPageTools() this->AddPage(_page_pencil, _("Pencil"), iter_tools, PREFS_PAGE_TOOLS_PENCIL); this->AddSelcueCheckbox(_page_pencil, "/tools/freehand/pencil", true); this->AddNewObjectsStyle(_page_pencil, "/tools/freehand/pencil"); + this->AddDotSizeSpinbutton(_page_pencil, "/tools/freehand/pencil", 3.0); _page_pencil.add_group_header( _("Sketch mode")); _page_pencil.add_line( true, "", _pencil_average_all_sketches, "", _("If on, the sketch result will be the normal average of all sketches made, instead of averaging the old result with the new sketch.")); -- 2.30.2