diff --git a/src/select-context.cpp b/src/select-context.cpp
index 7027de1efc66ea9a5d1aa09e5bab7f25209b7c7f..c527471f5a22c093da8c24bce6f9cbb5b95a1a2c 100644 (file)
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -318,6 +318,8 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE
sc->dragging = TRUE;
sc->moved = FALSE;
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
+
// remember the clicked item in sc->item:
sc->item = sp_event_context_find_item (desktop,
NR::Point(event->button.x, event->button.y), event->button.state & GDK_MOD1_MASK, FALSE);
@@ -331,6 +333,8 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE
NULL, event->button.time);
sc->grabbed = SP_CANVAS_ITEM(desktop->drawing);
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
+
ret = TRUE;
}
} else if (event->button.button == 3) {
desktop->setCurrentLayer(reinterpret_cast<SPObject *>(clicked_item));
sp_desktop_selection(desktop)->clear();
sc->dragging = false;
+
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
} else { // switch tool
tools_switch_by_item (desktop, clicked_item);
}
// motion notify coordinates as given (no snapping back to origin)
within_tolerance = false;
- if (sc->button_press_ctrl || sc->button_press_alt) // if ctrl or alt was pressed and it's not click, we want to drag rather than rubberband
+ if (sc->button_press_ctrl || sc->button_press_alt) {
+ // if ctrl or alt was pressed and it's not click, we want to drag rather than rubberband
sc->dragging = TRUE;
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
+ }
+
if (sc->dragging) {
/* User has dragged fast, so we get events on root (lauris)*/
// not only that; we will end up here when ctrl-dragging as well
ret = TRUE;
} else {
sc->dragging = FALSE;
+
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
}
} else {
Inkscape::Rubberband::get()->move(p);
}
}
sc->dragging = FALSE;
+
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
+
if (sc->item) {
sp_object_unref( SP_OBJECT(sc->item), NULL);
}
sp_canvas_item_ungrab(sc->grabbed, event->button.time);
sc->grabbed = NULL;
}
+
+ desktop->updateNow();
}
sc->button_press_shift = false;
sc->button_press_ctrl = false;
_("<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;
}
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;