diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2006-09-17 10:08:21 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2006-09-17 10:08:21 +0000 |
| commit | 8421a6502470616100a972b6414d2168f4800dea (patch) | |
| tree | 5000e3a26470f5b1c40503153d556b8336916a25 /src/select-context.cpp | |
| parent | Fixed bug causing crash when derivative field was not edited. TODO: do a chec... (diff) | |
| download | inkscape-8421a6502470616100a972b6414d2168f4800dea.tar.gz inkscape-8421a6502470616100a972b6414d2168f4800dea.zip | |
When an object is selected and Alt is pressed: now the cursor changes to the move-cursor. Handy for newcomers :)
(bzr r1710)
Diffstat (limited to 'src/select-context.cpp')
| -rw-r--r-- | src/select-context.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/select-context.cpp b/src/select-context.cpp index 6cffdc076..7efd013ec 100644 --- a/src/select-context.cpp +++ b/src/select-context.cpp @@ -627,6 +627,19 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) _("<b>Ctrl</b>: select in groups, move hor/vert"), _("<b>Shift</b>: toggle select, force rubberband, disable snapping"), _("<b>Alt</b>: select under, move selected")); + // if Alt then change cursor to moving cursor: + guint keyval = get_group0_keyval(&event->key); + bool alt = ( MOD__ALT + || (keyval == GDK_Alt_L) + || (keyval == GDK_Alt_R) + || (keyval == GDK_Meta_L) + || (keyval == GDK_Meta_R)); + if (alt) { + GdkCursor *cursor = gdk_cursor_new(GDK_FLEUR); + gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, cursor); + gdk_cursor_destroy(cursor); + } + //*/ break; } @@ -799,6 +812,8 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) case GDK_KEY_RELEASE: if (key_is_a_modifier (get_group0_keyval (&event->key))) event_context->defaultMessageContext()->clear(); + // set cursor to default. + gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, event_context->cursor); break; default: break; |
