summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0eba65a)
raw | patch | inline | side by side (parent: 0eba65a)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Sun, 23 Aug 2009 19:56:43 +0000 (19:56 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Sun, 23 Aug 2009 19:56:43 +0000 (19:56 +0000) |
- constrained snap: use projected point to calculate the snap distance
src/desktop.cpp | patch | blob | history | |
src/snap.cpp | patch | blob | history |
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 6b7c20094766f35cf582a995900ac2f1a9aaa3e5..8c070786e6a5d0e6530ad48426cb0abadd55cee7 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
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 c03f2e1e628e09b7d9108a450b94b261080063a7..545607889c48e13f21da41c2e05150b2028be135 100644 (file)
--- 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);
}
/**