summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2009-02-24 11:31:49 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2009-02-24 11:31:49 +0000
commite4c7c9871db9e68faaccda6e904d69453f02472c (patch)
treeda340a16d49dca53ec06a8fd429541ae41dd0b22 /src
parentfix scaling of text without font size set (diff)
downloadinkscape-e4c7c9871db9e68faaccda6e904d69453f02472c.tar.gz
inkscape-e4c7c9871db9e68faaccda6e904d69453f02472c.zip
limit dot creation to straight line modes of Pen only
(bzr r7359)
Diffstat (limited to 'src')
-rw-r--r--src/pen-context.cpp12
-rw-r--r--src/pencil-context.cpp16
2 files changed, 8 insertions, 20 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index c8dae0bdd..d0889b4ec 100644
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
@@ -471,17 +471,17 @@ static gint pen_handle_button_press(SPPenContext *const pc, GdkEventButton const
if (pc->npoints == 0) {
Geom::Point p;
- if (bevent.state & GDK_CONTROL_MASK) {
+ if ((bevent.state & GDK_CONTROL_MASK) && (pc->polylines_only || pc->polylines_paraxial)) {
p = event_dt;
if (!(bevent.state & GDK_SHIFT_MASK)) {
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
- m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, p, Inkscape::SNAPSOURCE_HANDLE);
+ m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, p, Inkscape::SNAPSOURCE_HANDLE);
}
- spdc_create_single_dot(event_context, p, "/tools/freehand/pen", bevent.state);
- ret = TRUE;
- break;
- }
+ spdc_create_single_dot(event_context, p, "/tools/freehand/pen", bevent.state);
+ ret = TRUE;
+ break;
+ }
// TODO: Perhaps it would be nicer to rearrange the following case
// distinction so that the case of a waiting LPE is treated separately
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index 3e3a95c24..fc2088a17 100644
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
@@ -257,15 +257,6 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve
m.setup(desktop);
sp_canvas_set_snap_delay_active(desktop->canvas, true);
- 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);
- sp_canvas_set_snap_delay_active(desktop->canvas, false);
- ret = true;
- break;
- }
if (anchor) {
p = anchor->dp;
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Continuing selected path"));
@@ -425,11 +416,8 @@ 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 */
- 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;
- //sp_canvas_set_snap_delay_active(dt->canvas, true);
- }
+ pc->state = SP_PENCIL_CONTEXT_ADDLINE;
+ //sp_canvas_set_snap_delay_active(dt->canvas, true);
ret = TRUE;
break;
case SP_PENCIL_CONTEXT_ADDLINE: