From f683e71a0c8de7ad2b62658c71fe5de75ca8cf4d Mon Sep 17 00:00:00 2001 From: cilix42 Date: Mon, 16 Jun 2008 16:17:12 +0000 Subject: [PATCH] Temporarily add shortcuts in pen context to activate some LPEs which need path input. Will be removed soon when we have a UI for this. --- src/pen-context.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 1a9f3e39f..6074eaa4b 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -991,6 +991,39 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) } break; + case GDK_P: + case GDK_p: + if (MOD__SHIFT_ONLY) { + pc->polylines_only = !pc->polylines_only; + g_print ("polylines_only mode is now %s\n", pc->polylines_only ? "true" : "false"); + ret = TRUE; + } + break; + + case GDK_C: + case GDK_c: + if (MOD__SHIFT_ONLY) { + sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::CIRCLE_3PTS, 3); + ret = TRUE; + } + break; + + case GDK_B: + case GDK_b: + if (MOD__SHIFT_ONLY) { + sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::PERP_BISECTOR, 2); + ret = TRUE; + } + break; + + case GDK_A: + case GDK_a: + if (MOD__SHIFT_ONLY) { + sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::ANGLE_BISECTOR, 3); + ret = TRUE; + } + break; + case GDK_U: case GDK_u: if (MOD__SHIFT_ONLY) { @@ -1297,6 +1330,8 @@ void sp_pen_context_wait_for_LPE_mouse_clicks(SPPenContext *pc, Inkscape::LivePathEffect::EffectType effect_type, unsigned int num_clicks, bool use_polylines) { + g_print ("Now waiting for %s to be applied\n", + Inkscape::LivePathEffect::LPETypeConverter.get_label(effect_type).c_str()); pc->expecting_clicks_for_LPE = num_clicks; pc->polylines_only = use_polylines; pc->waiting_LPE_type = effect_type; -- 2.30.2