From: dvlierop2 Date: Sun, 23 Aug 2009 19:56:43 +0000 (+0000) Subject: - fix bug #414142 (Moving path nodes twice is hard when snap is enabled) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4a95ea66e2f293a736a0f2642b88e12c79683da6;p=inkscape.git - fix bug #414142 (Moving path nodes twice is hard when snap is enabled) - constrained snap: use projected point to calculate the snap distance --- diff --git a/src/desktop.cpp b/src/desktop.cpp index 6b7c20094..8c070786e 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -226,11 +226,18 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas) setDisplayModeNormal(); } + // The order in which these canvas items are added determines the z-order. It's therefore + // important to add the tempgroup (which will contain the snapindicator) before adding the + // controls. Only this way one will be able to quickly (before the snap indicator has + // disappeared) reselect a node after snapping it. If the z-order is wrong however, this + // will not work (the snap indicator is on top of the node handler; is the snapindicator + // being selected? or does it intercept some of the events that should have gone to the + // node handler? see bug https://bugs.launchpad.net/inkscape/+bug/414142) gridgroup = (SPCanvasGroup *) sp_canvas_item_new (main, SP_TYPE_CANVAS_GROUP, NULL); guides = (SPCanvasGroup *) sp_canvas_item_new (main, SP_TYPE_CANVAS_GROUP, NULL); sketch = (SPCanvasGroup *) sp_canvas_item_new (main, SP_TYPE_CANVAS_GROUP, NULL); - controls = (SPCanvasGroup *) sp_canvas_item_new (main, SP_TYPE_CANVAS_GROUP, NULL); tempgroup = (SPCanvasGroup *) sp_canvas_item_new (main, SP_TYPE_CANVAS_GROUP, NULL); + controls = (SPCanvasGroup *) sp_canvas_item_new (main, SP_TYPE_CANVAS_GROUP, NULL); /* Push select tool to the bottom of stack */ /** \todo diff --git a/src/snap.cpp b/src/snap.cpp index c03f2e1e6..545607889 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -393,7 +393,7 @@ Inkscape::SnappedPoint SnapManager::constrainedSnap(Inkscape::SnapPreferences::P delete items_to_ignore; } - return findBestSnap(p, source_type, sc, true); + return findBestSnap(pp, source_type, sc, true); } /**