summaryrefslogtreecommitdiffstats
path: root/src/select-context.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2011-11-04 21:30:19 +0000
committerDiederik van Lierop <mail@diedenrezi.nl>2011-11-04 21:30:19 +0000
commit224a99dc216119d34eb3ed13d12f123158acfe3c (patch)
treecb012b688f276656612f2994e461fda3622bcd20 /src/select-context.cpp
parentPowerstroke: add erasing of knots with ctrl+alt (LPE parameter editing on-can... (diff)
downloadinkscape-224a99dc216119d34eb3ed13d12f123158acfe3c.tar.gz
inkscape-224a99dc216119d34eb3ed13d12f123158acfe3c.zip
1) Cycle to the next-closest-snap-source when pressing tab, if the snap-closest-point-only-option has been activated. Works for the selector tool, but also when scaling/stretching/skewing a selection of nodes in the node tool
2) Cleanup and simplification of the code that finds the closest snapsource (bzr r10720)
Diffstat (limited to 'src/select-context.cpp')
-rw-r--r--src/select-context.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/select-context.cpp b/src/select-context.cpp
index 99ad35124..3803b7d07 100644
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -398,6 +398,16 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE
seltrans->stamp();
ret = TRUE;
}
+ } else if (get_group0_keyval (&event->key) == GDK_Tab) {
+ if (sc->dragging && sc->grabbed) {
+ seltrans->getNextClosestPoint(false);
+ ret = TRUE;
+ }
+ } else if (get_group0_keyval (&event->key) == GDK_ISO_Left_Tab) {
+ if (sc->dragging && sc->grabbed) {
+ seltrans->getNextClosestPoint(true);
+ ret = TRUE;
+ }
}
break;
@@ -531,8 +541,8 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_MOTION_NOTIFY:
{
- tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100);
- if (event->motion.state & GDK_BUTTON1_MASK && !event_context->space_panning) {
+ tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100);
+ if ((event->motion.state & GDK_BUTTON1_MASK) && !event_context->space_panning) {
Geom::Point const motion_pt(event->motion.x, event->motion.y);
Geom::Point const p(desktop->w2d(motion_pt));
@@ -549,7 +559,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
if (sc->button_press_ctrl || (sc->button_press_alt && !sc->button_press_shift && !selection->isEmpty())) {
// if it's not click and ctrl or alt was pressed (the latter with some selection
// but not with shift) we want to drag rather than rubberband
- sc->dragging = TRUE;
+ sc->dragging = TRUE;
gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, CursorSelectDragging);
sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);