summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f200d31)
raw | patch | inline | side by side (parent: f200d31)
author | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sat, 23 Jan 2010 13:58:50 +0000 (14:58 +0100) | ||
committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sat, 23 Jan 2010 13:58:50 +0000 (14:58 +0100) |
src/event-context.cpp | patch | blob | history | |
src/snap-enums.h | patch | blob | history |
diff --git a/src/event-context.cpp b/src/event-context.cpp
index 100e6b1430123126dfbf94c6466a90c4776feb58..5592741d9a525cd48d0258c76c0c4e523a660040 100644 (file)
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
SPItem * item, GdkEvent * event) {
switch (event->type) {
case GDK_MOTION_NOTIFY:
- sp_event_context_snap_delay_handler(event_context, item, NULL,
- (GdkEventMotion *) event,
- DelayedSnapEvent::EVENTCONTEXT_ITEM_HANDLER);
+ sp_event_context_snap_delay_handler(event_context, item, NULL, (GdkEventMotion *) event, DelayedSnapEvent::EVENTCONTEXT_ITEM_HANDLER);
break;
case GDK_BUTTON_RELEASE:
if (event_context->_delayed_snap_event) {
// If we have any pending snapping action, then invoke it now
- sp_event_context_snap_watchdog_callback(
- event_context->_delayed_snap_event);
+ sp_event_context_snap_watchdog_callback(event_context->_delayed_snap_event);
}
break;
- /*case GDK_BUTTON_PRESS:
- case GDK_2BUTTON_PRESS:
- case GDK_3BUTTON_PRESS:
- // Snapping will be on hold if we're moving the mouse at high speeds. When starting
- // drawing a new shape we really should snap though.
- event_context->desktop->namedview->snap_manager.snapprefs.setSnapPostponedGlobally(false);
- break;
- */
+ case GDK_BUTTON_PRESS:
+ case GDK_2BUTTON_PRESS:
+ case GDK_3BUTTON_PRESS:
+ // Snapping will be on hold if we're moving the mouse at high speeds. When starting
+ // drawing a new shape we really should snap though.
+ event_context->desktop->namedview->snap_manager.snapprefs.setSnapPostponedGlobally(false);
+ break;
default:
break;
}
diff --git a/src/snap-enums.h b/src/snap-enums.h
index 41cc65abb2d6deb8ba40886df0d1a5879d0ad3c5..60893de6afa1b9fdae60e1c6a222479bc6d9e61f 100644 (file)
--- a/src/snap-enums.h
+++ b/src/snap-enums.h
SNAPSOURCE_CORNER, // of image or of rectangle
SNAPSOURCE_CONVEX_HULL_CORNER,
SNAPSOURCE_ELLIPSE_QUADRANT_POINT,
- SNAPSOURCE_NODE_HANDLE,
+ SNAPSOURCE_NODE_HANDLE, // eg. nodes in the path editor, handles of stars or rectangles, etc. (tied to a stroke)
//-------------------------------------------------------------------
// Other points (e.g. guides, gradient knots) will snap to both bounding boxes and nodes
SNAPSOURCE_OTHER_CATEGORY = 1024, // will be used as a flag and must therefore be a power of two
SNAPSOURCE_GUIDE,
SNAPSOURCE_GUIDE_ORIGIN,
SNAPSOURCE_TEXT_BASELINE,
- SNAPSOURCE_OTHER_HANDLE
+ SNAPSOURCE_OTHER_HANDLE // eg. the handle of a gradient of a connector (ie not being tied to a stroke)
};
}