summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f389545)
raw | patch | inline | side by side (parent: f389545)
author | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sat, 6 Feb 2010 14:59:28 +0000 (15:59 +0100) | ||
committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sat, 6 Feb 2010 14:59:28 +0000 (15:59 +0100) |
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index ccaaedd14e6d6f5be8e24d37a462400c882673a2..799167a72a156528d79b5536a604c9d3bb8c75aa 100644 (file)
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
gobble_motion_events(GDK_BUTTON1_MASK);
ret = TRUE;
- } else if (sp_event_context_knot_mouseover(ac)){
+ } else if (!sp_event_context_knot_mouseover(ac)){
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index bf9bd7b6faa49bf97c017d08b161de8f12a2a62b..5534aa4109187b45df4c6d2ae009b06b9d1f171d 100644 (file)
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -387,7 +387,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
sp_box3d_drag(*bc, event->motion.state);
ret = TRUE;
- } else if (sp_event_context_knot_mouseover(bc)) {
+ } else if (!sp_event_context_knot_mouseover(bc)) {
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
index 294e129b3f4e40bdda229aeedd30fd44d9bbb9f8..b61c00df6a9a15968c82be0f0ee46f745f35ddee 100644 (file)
@@ -976,7 +976,7 @@ connector_handle_motion_notify(SPConnectorContext *const cc, GdkEventMotion cons
/* This is perfectly valid */
break;
default:
- if (sp_event_context_knot_mouseover(cc)) {
+ if (!sp_event_context_knot_mouseover(cc)) {
m.preSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_OTHER_HANDLE));
}
break;
diff --git a/src/event-context.cpp b/src/event-context.cpp
index 1e47b9d9da4be0790ec4094543c7138eca6f8a2a..77c10765bdb37e014c4a29a5f784024bfe1a48f7 100644 (file)
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
return ret;
}
+/**
+ * @brief: Returns true if we're hovering above a knot (needed because we don't want to pre-snap in that case)
+ */
+
bool sp_event_context_knot_mouseover(SPEventContext *ec)
{
if (ec->shape_editor) {
- return !(ec->shape_editor->knot_mouseover());
+ return ec->shape_editor->knot_mouseover();
}
return false;
index b73d258fdddfb31d1216cdd3a8b6eae2aa45891c..8bdfe2f7c9cb6281d5aa4873c66452b55ec6972d 100644 (file)
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -593,7 +593,7 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
ret = TRUE;
} else {
- if (sp_event_context_knot_mouseover(event_context)) {
+ if (!sp_event_context_knot_mouseover(event_context)) {
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 9cf4d5420ef10ad905cce0210c6206beb3183224..74c402c425284d823c2e83b8ac1b7784311dec04 100644 (file)
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
spdc_endpoint_snap(pc, p, mevent.state);
spdc_pen_set_subsequent_point(pc, p, true);
ret = TRUE;
- } else if (sp_event_context_knot_mouseover(pc)) {
+ } else if (!sp_event_context_knot_mouseover(pc)) {
SnapManager &m = dt->namedview->snap_manager;
m.setup(dt);
m.preSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_NODE_HANDLE));
pc->_message_context->clear();
pc->anchor_statusbar = false;
}
- if (sp_event_context_knot_mouseover(pc)) {
+ if (!sp_event_context_knot_mouseover(pc)) {
SnapManager &m = dt->namedview->snap_manager;
m.setup(dt);
m.preSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_NODE_HANDLE));
/* This is perfectly valid */
break;
default:
- if (sp_event_context_knot_mouseover(pc)) {
+ if (!sp_event_context_knot_mouseover(pc)) {
SnapManager &m = dt->namedview->snap_manager;
m.setup(dt);
m.preSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_NODE_HANDLE));
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index 328c011ff9fb24b4d4dfccff7bdfce0b3b72251a..f181744577a10f620378e618bb25da7186ca4270 100644 (file)
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
@@ -364,10 +364,6 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev
/* Create green anchor */
pc->green_anchor = sp_draw_anchor_new(pc, pc->green_curve, TRUE, pc->p[0]);
}
- /** \todo
- * fixme: I am not sure whether we want to snap to anchors
- * in middle of freehand (Lauris)
- */
if (anchor) {
p = anchor->dp;
}
@@ -395,7 +391,7 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev
pc->_message_context->clear();
pc->anchor_statusbar = false;
}
- if (sp_event_context_knot_mouseover(pc)) {
+ if (!sp_event_context_knot_mouseover(pc)) {
SnapManager &m = dt->namedview->snap_manager;
m.setup(dt);
m.preSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_NODE_HANDLE));
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index 9eab188ddea51a9a1ee0f87327be2bdb4ab8d600..a3c3ab0b5a048cab4203b639a457280d474b781e 100644 (file)
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -317,7 +317,7 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
sp_rect_drag(*rc, motion_dt, event->motion.state); // this will also handle the snapping
gobble_motion_events(GDK_BUTTON1_MASK);
ret = TRUE;
- } else if (sp_event_context_knot_mouseover(rc)) {
+ } else if (!sp_event_context_knot_mouseover(rc)) {
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index f8a4bddfb8c4f0b81f2ab322e363f6a95b15482a..7ce9d47107a24c4bcd367195d98316aabe457f14 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
gobble_motion_events(GDK_BUTTON1_MASK);
ret = TRUE;
- } else if (sp_event_context_knot_mouseover(sc)) {
+ } else if (!sp_event_context_knot_mouseover(sc)) {
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
diff --git a/src/star-context.cpp b/src/star-context.cpp
index 693d5188860d9c07eaeb10619dcbf41a80dbbd93..4d5d9780cbe3cec6693c5495c518817a6c2c1cb5 100644 (file)
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
@@ -291,7 +291,7 @@ static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent
gobble_motion_events(GDK_BUTTON1_MASK);
ret = TRUE;
- } else if (sp_event_context_knot_mouseover(event_context)) {
+ } else if (!sp_event_context_knot_mouseover(event_context)) {
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);