diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2013-04-28 22:48:03 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2013-04-28 22:48:03 +0000 |
| commit | 192d134e8283fadf349eb41d66f63206c98c33d1 (patch) | |
| tree | 11f47ff079215d7be226df5a84fcc75c9fcbf3e4 /src/pen-context.cpp | |
| parent | Warning cleanup. (diff) | |
| download | inkscape-192d134e8283fadf349eb41d66f63206c98c33d1.tar.gz inkscape-192d134e8283fadf349eb41d66f63206c98c33d1.zip | |
Temporily fix abiguous macros before later removal.
(bzr r12310)
Diffstat (limited to 'src/pen-context.cpp')
| -rw-r--r-- | src/pen-context.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 6e3ed201e..5972a6ca8 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -950,13 +950,13 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) case GDK_KEY_Left: // move last point left case GDK_KEY_KP_Left: - if (!MOD__CTRL) { // not ctrl - if (MOD__ALT) { // alt - if (MOD__SHIFT) pen_lastpoint_move_screen(pc, -10, 0); // shift + if (!MOD__CTRL(event)) { // not ctrl + if (MOD__ALT(event)) { // alt + if (MOD__SHIFT(event)) pen_lastpoint_move_screen(pc, -10, 0); // shift else pen_lastpoint_move_screen(pc, -1, 0); // no shift } else { // no alt - if (MOD__SHIFT) pen_lastpoint_move(pc, -10*nudge, 0); // shift + if (MOD__SHIFT(event)) pen_lastpoint_move(pc, -10*nudge, 0); // shift else pen_lastpoint_move(pc, -nudge, 0); // no shift } ret = TRUE; @@ -964,13 +964,13 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) break; case GDK_KEY_Up: // move last point up case GDK_KEY_KP_Up: - if (!MOD__CTRL) { // not ctrl - if (MOD__ALT) { // alt - if (MOD__SHIFT) pen_lastpoint_move_screen(pc, 0, 10); // shift + if (!MOD__CTRL(event)) { // not ctrl + if (MOD__ALT(event)) { // alt + if (MOD__SHIFT(event)) pen_lastpoint_move_screen(pc, 0, 10); // shift else pen_lastpoint_move_screen(pc, 0, 1); // no shift } else { // no alt - if (MOD__SHIFT) pen_lastpoint_move(pc, 0, 10*nudge); // shift + if (MOD__SHIFT(event)) pen_lastpoint_move(pc, 0, 10*nudge); // shift else pen_lastpoint_move(pc, 0, nudge); // no shift } ret = TRUE; @@ -978,13 +978,13 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) break; case GDK_KEY_Right: // move last point right case GDK_KEY_KP_Right: - if (!MOD__CTRL) { // not ctrl - if (MOD__ALT) { // alt - if (MOD__SHIFT) pen_lastpoint_move_screen(pc, 10, 0); // shift + if (!MOD__CTRL(event)) { // not ctrl + if (MOD__ALT(event)) { // alt + if (MOD__SHIFT(event)) pen_lastpoint_move_screen(pc, 10, 0); // shift else pen_lastpoint_move_screen(pc, 1, 0); // no shift } else { // no alt - if (MOD__SHIFT) pen_lastpoint_move(pc, 10*nudge, 0); // shift + if (MOD__SHIFT(event)) pen_lastpoint_move(pc, 10*nudge, 0); // shift else pen_lastpoint_move(pc, nudge, 0); // no shift } ret = TRUE; @@ -992,13 +992,13 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) break; case GDK_KEY_Down: // move last point down case GDK_KEY_KP_Down: - if (!MOD__CTRL) { // not ctrl - if (MOD__ALT) { // alt - if (MOD__SHIFT) pen_lastpoint_move_screen(pc, 0, -10); // shift + if (!MOD__CTRL(event)) { // not ctrl + if (MOD__ALT(event)) { // alt + if (MOD__SHIFT(event)) pen_lastpoint_move_screen(pc, 0, -10); // shift else pen_lastpoint_move_screen(pc, 0, -1); // no shift } else { // no alt - if (MOD__SHIFT) pen_lastpoint_move(pc, 0, -10*nudge); // shift + if (MOD__SHIFT(event)) pen_lastpoint_move(pc, 0, -10*nudge); // shift else pen_lastpoint_move(pc, 0, -nudge); // no shift } ret = TRUE; @@ -1008,7 +1008,7 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) /*TODO: this is not yet enabled?? looks like some traces of the Geometry tool case GDK_KEY_P: case GDK_KEY_p: - if (MOD__SHIFT_ONLY) { + if (MOD__SHIFT_ONLY(event)) { sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::PARALLEL, 2); ret = TRUE; } @@ -1016,7 +1016,7 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) case GDK_KEY_C: case GDK_KEY_c: - if (MOD__SHIFT_ONLY) { + if (MOD__SHIFT_ONLY(event)) { sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::CIRCLE_3PTS, 3); ret = TRUE; } @@ -1024,7 +1024,7 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) case GDK_KEY_B: case GDK_KEY_b: - if (MOD__SHIFT_ONLY) { + if (MOD__SHIFT_ONLY(event)) { sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::PERP_BISECTOR, 2); ret = TRUE; } @@ -1032,7 +1032,7 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) case GDK_KEY_A: case GDK_KEY_a: - if (MOD__SHIFT_ONLY) { + if (MOD__SHIFT_ONLY(event)) { sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::ANGLE_BISECTOR, 3); ret = TRUE; } @@ -1041,14 +1041,14 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) case GDK_KEY_U: case GDK_KEY_u: - if (MOD__SHIFT_ONLY) { + if (MOD__SHIFT_ONLY(event)) { pen_lastpoint_tocurve(pc); ret = TRUE; } break; case GDK_KEY_L: case GDK_KEY_l: - if (MOD__SHIFT_ONLY) { + if (MOD__SHIFT_ONLY(event)) { pen_lastpoint_toline(pc); ret = TRUE; } @@ -1070,7 +1070,7 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) break; case GDK_KEY_z: case GDK_KEY_Z: - if (MOD__CTRL_ONLY && pc->npoints != 0) { + if (MOD__CTRL_ONLY(event) && pc->npoints != 0) { // if drawing, cancel, otherwise pass it up for undo pen_cancel (pc); ret = TRUE; @@ -1078,7 +1078,7 @@ static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) break; case GDK_KEY_g: case GDK_KEY_G: - if (MOD__SHIFT_ONLY) { + if (MOD__SHIFT_ONLY(event)) { sp_selection_to_guides(SP_EVENT_CONTEXT(pc)->desktop); ret = true; } |
