summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 721fb43)
raw | patch | inline | side by side (parent: 721fb43)
author | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sun, 7 Mar 2010 21:15:29 +0000 (22:15 +0100) | ||
committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sun, 7 Mar 2010 21:15:29 +0000 (22:15 +0100) |
2) When dragging the guide origin along the guide, then don't change the mousepointer to the rotation arrows if shift is pressed
src/desktop-events.cpp | patch | blob | history |
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp
index 89f530d956d1d3fbf64c334779883ebe1937e30b..810f501d7fe1bbf024161db08f6fa31b54d9e314 100644 (file)
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
m.guideConstrainedSnap(motion_dt, *guide);
}
} else if (!(event->motion.state & GDK_SHIFT_MASK)) {
- m.guideFreeSnap(motion_dt, guide->normal_to_line, drag_type);
+ if (!((drag_type == SP_DRAG_ROTATE) && (event->motion.state & GDK_CONTROL_MASK))) {
+ m.guideFreeSnap(motion_dt, guide->normal_to_line, drag_type);
+ }
}
switch (drag_type) {
{
Geom::Point pt = motion_dt - guide->point_on_line;
double angle = std::atan2(pt[Geom::Y], pt[Geom::X]);
- if (event->motion.state & GDK_CONTROL_MASK) {
+ if (event->motion.state & GDK_CONTROL_MASK) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
unsigned const snaps = abs(prefs->getInt("/options/rotationsnapsperpi/value", 12));
if (snaps) {
m.guideConstrainedSnap(event_dt, *guide);
}
} else if (!(event->button.state & GDK_SHIFT_MASK)) {
- m.guideFreeSnap(event_dt, guide->normal_to_line, drag_type);
+ if (!((drag_type == SP_DRAG_ROTATE) && (event->motion.state & GDK_CONTROL_MASK))) {
+ m.guideFreeSnap(event_dt, guide->normal_to_line, drag_type);
+ }
}
if (sp_canvas_world_pt_inside_window(item->canvas, event_w)) {
Geom::Point const event_w(event->crossing.x, event->crossing.y);
Geom::Point const event_dt(desktop->w2d(event_w));
- if (event->crossing.state & GDK_SHIFT_MASK) {
+ if ((event->crossing.state & GDK_SHIFT_MASK) && (drag_type != SP_DRAG_MOVE_ORIGIN)) {
GdkCursor *guide_cursor;
guide_cursor = gdk_cursor_new (GDK_EXCHANGE);
gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, guide_cursor);
}
case GDK_Shift_L:
case GDK_Shift_R:
- GdkCursor *guide_cursor;
- guide_cursor = gdk_cursor_new (GDK_EXCHANGE);
- gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, guide_cursor);
- gdk_cursor_unref(guide_cursor);
- ret = TRUE;
+ if (drag_type != SP_DRAG_MOVE_ORIGIN) {
+ GdkCursor *guide_cursor;
+ guide_cursor = gdk_cursor_new (GDK_EXCHANGE);
+ gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, guide_cursor);
+ gdk_cursor_unref(guide_cursor);
+ ret = TRUE;
+ break;
+ }
+
default:
// do nothing;
break;