summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b717ad7)
raw | patch | inline | side by side (parent: b717ad7)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 24 Feb 2009 11:31:49 +0000 (11:31 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 24 Feb 2009 11:31:49 +0000 (11:31 +0000) |
src/pen-context.cpp | patch | blob | history | |
src/pencil-context.cpp | patch | blob | history |
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index c8dae0bdd687dc1e8c4f7c3c4a452b9f37e48c03..d0889b4ec3a0cefa7ba9d8cde54926efea917e0d 100644 (file)
--- 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 3e3a95c24922eabbfebfcc9df048cfc2077da460..fc2088a17af0f8e242058f501581e8e704524a7e 100644 (file)
--- 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: