summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d011b05)
raw | patch | inline | side by side (parent: d011b05)
author | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Thu, 1 Jul 2010 21:21:58 +0000 (23:21 +0200) | ||
committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Thu, 1 Jul 2010 21:21:58 +0000 (23:21 +0200) |
src/gradient-drag.cpp | patch | blob | history | |
src/object-snapper.cpp | patch | blob | history |
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 227a5f0033cb4cacbceff49fa65d52c17e9064b3..c9a982e42e92d9d454e1a3cd9518cf9b1116ffc8 100644 (file)
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -809,9 +809,10 @@ gr_knot_moved_midpoint_handler(SPKnot */*knot*/, Geom::Point const &ppointer, gu
} else {
p = snap_vector_midpoint (p, low_lim, high_lim, 0);
if (!(state & GDK_SHIFT_MASK)) {
+ Inkscape::Snapper::ConstraintLine cl(low_lim, high_lim - low_lim);
SPDesktop *desktop = dragger->parent->desktop;
SnapManager &m = desktop->namedview->snap_manager;
- Inkscape::Snapper::ConstraintLine cl(low_lim, high_lim - low_lim);
+ m.setup(desktop);
m.constrainedSnapReturnByRef(p, Inkscape::SNAPSOURCE_OTHER_HANDLE, cl);
}
}
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index bced0ac44d22989a8f8faa8667e7694e319dc26f..983a6fedee8eda2423f46ab49833148d6eebdab4 100644 (file)
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
return;
}
+ if (_snapmanager->getDesktop() == NULL) {
+ g_warning("desktop == NULL, so we cannot snap; please inform the developpers of this bug");
+ // Apparently the etup() method from the SnapManager class hasn't been called before trying to snap.
+ }
+
+
if (first_point) {
_candidates->clear();
}
bbox_to_snap_incl.expandBy(getSnapperTolerance()); // see?
for (SPObject* o = sp_object_first_child(parent); o != NULL; o = SP_OBJECT_NEXT(o)) {
- g_assert(_snapmanager->getDesktop() != NULL);
if (SP_IS_ITEM(o) && !(_snapmanager->getDesktop()->itemIsHidden(SP_ITEM(o)) && !clip_or_mask)) {
// Snapping to items in a locked layer is allowed
// Don't snap to hidden objects, unless they're a clipped path or a mask