diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-07-14 21:09:41 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-07-14 21:09:41 +0000 |
| commit | d32efb61f1c2c18d1018e510bbe9bafc04a03905 (patch) | |
| tree | b447bf9856baf1cf485e38c4ce55edb27285129e /src/mesh-context.cpp | |
| parent | Merged from trunk (r12305) (diff) | |
| parent | Minor C++ish refactoring pass. (diff) | |
| download | inkscape-d32efb61f1c2c18d1018e510bbe9bafc04a03905.tar.gz inkscape-d32efb61f1c2c18d1018e510bbe9bafc04a03905.zip | |
Merged from trunk (r12419).
(bzr r11608.1.107)
Diffstat (limited to 'src/mesh-context.cpp')
| -rw-r--r-- | src/mesh-context.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/mesh-context.cpp b/src/mesh-context.cpp index c7cf60d06..fce4cbb9a 100644 --- a/src/mesh-context.cpp +++ b/src/mesh-context.cpp @@ -728,7 +728,7 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_A: case GDK_KEY_a: - if (MOD__CTRL_ONLY && drag->isNonEmpty()) { + if (MOD__CTRL_ONLY(event) && drag->isNonEmpty()) { drag->selectAll(); ret = TRUE; } @@ -748,17 +748,17 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_Left: // move handle left case GDK_KEY_KP_Left: case GDK_KEY_KP_4: - if (!MOD__CTRL) { // not ctrl + if (!MOD__CTRL(event)) { // not ctrl gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - if (MOD__ALT) { // alt - if (MOD__SHIFT) { + if (MOD__ALT(event)) { // alt + if (MOD__SHIFT(event)) { drag->selected_move_screen(mul*-10, 0); // shift } else { drag->selected_move_screen(mul*-1, 0); // no shift } } else { // no alt - if (MOD__SHIFT) { + if (MOD__SHIFT(event)) { drag->selected_move(mul*-10*nudge, 0); // shift } else { drag->selected_move(mul*-nudge, 0); // no shift @@ -772,17 +772,17 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_Up: // move handle up case GDK_KEY_KP_Up: case GDK_KEY_KP_8: - if (!MOD__CTRL) { // not ctrl + if (!MOD__CTRL(event)) { // not ctrl gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - if (MOD__ALT) { // alt - if (MOD__SHIFT) { + if (MOD__ALT(event)) { // alt + if (MOD__SHIFT(event)) { drag->selected_move_screen(0, mul*10); // shift } else { drag->selected_move_screen(0, mul*1); // no shift } } else { // no alt - if (MOD__SHIFT) { + if (MOD__SHIFT(event)) { drag->selected_move(0, mul*10*nudge); // shift } else { drag->selected_move(0, mul*nudge); // no shift @@ -796,17 +796,17 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_Right: // move handle right case GDK_KEY_KP_Right: case GDK_KEY_KP_6: - if (!MOD__CTRL) { // not ctrl + if (!MOD__CTRL(event)) { // not ctrl gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - if (MOD__ALT) { // alt - if (MOD__SHIFT) { + if (MOD__ALT(event)) { // alt + if (MOD__SHIFT(event)) { drag->selected_move_screen(mul*10, 0); // shift } else { drag->selected_move_screen(mul*1, 0); // no shift } } else { // no alt - if (MOD__SHIFT) { + if (MOD__SHIFT(event)) { drag->selected_move(mul*10*nudge, 0); // shift } else { drag->selected_move(mul*nudge, 0); // no shift @@ -820,17 +820,17 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_Down: // move handle down case GDK_KEY_KP_Down: case GDK_KEY_KP_2: - if (!MOD__CTRL) { // not ctrl + if (!MOD__CTRL(event)) { // not ctrl gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - if (MOD__ALT) { // alt - if (MOD__SHIFT) { + if (MOD__ALT(event)) { // alt + if (MOD__SHIFT(event)) { drag->selected_move_screen(0, mul*-10); // shift } else { drag->selected_move_screen(0, mul*-1); // no shift } } else { // no alt - if (MOD__SHIFT) { + if (MOD__SHIFT(event)) { drag->selected_move(0, mul*-10*nudge); // shift } else { drag->selected_move(0, mul*-nudge); // no shift @@ -862,7 +862,7 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_b: // Toggle mesh side between lineto and curveto. case GDK_KEY_B: - if (MOD__ALT && drag->isNonEmpty() && drag->hasSelection()) { + if (MOD__ALT(event) && drag->isNonEmpty() && drag->hasSelection()) { sp_mesh_context_corner_operation ( this, MG_CORNER_SIDE_TOGGLE ); ret = TRUE; } @@ -870,7 +870,7 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_c: // Convert mesh side from generic Bezier to Bezier approximating arc, case GDK_KEY_C: // preserving handle direction. - if (MOD__ALT && drag->isNonEmpty() && drag->hasSelection()) { + if (MOD__ALT(event) && drag->isNonEmpty() && drag->hasSelection()) { sp_mesh_context_corner_operation ( this, MG_CORNER_SIDE_ARC ); ret = TRUE; } @@ -878,7 +878,7 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_g: // Toggle mesh tensor points on/off case GDK_KEY_G: - if (MOD__ALT && drag->isNonEmpty() && drag->hasSelection()) { + if (MOD__ALT(event) && drag->isNonEmpty() && drag->hasSelection()) { sp_mesh_context_corner_operation ( this, MG_CORNER_TENSOR_TOGGLE ); ret = TRUE; } @@ -886,7 +886,7 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_j: // Smooth corner color case GDK_KEY_J: - if (MOD__ALT && drag->isNonEmpty() && drag->hasSelection()) { + if (MOD__ALT(event) && drag->isNonEmpty() && drag->hasSelection()) { sp_mesh_context_corner_operation ( this, MG_CORNER_COLOR_SMOOTH ); ret = TRUE; } @@ -894,7 +894,7 @@ gint SPMeshContext::root_handler(GdkEvent* event) { case GDK_KEY_k: // Pick corner color case GDK_KEY_K: - if (MOD__ALT && drag->isNonEmpty() && drag->hasSelection()) { + if (MOD__ALT(event) && drag->isNonEmpty() && drag->hasSelection()) { sp_mesh_context_corner_operation ( this, MG_CORNER_COLOR_PICK ); ret = TRUE; } |
