summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: acd3a57)
raw | patch | inline | side by side (parent: acd3a57)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Fri, 24 Apr 2009 20:31:23 +0000 (20:31 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Fri, 24 Apr 2009 20:31:23 +0000 (20:31 +0000) |
src/object-snapper.cpp | patch | blob | history | |
src/sp-item.cpp | patch | blob | history |
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index 778928ae75c4fa3ced5562728bc1dd8113bc05a1..70377cb661fe77f22dafc401387a90b72e359216 100644 (file)
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
return (_snap_enabled && _snapmanager->snapprefs.getSnapModeBBoxOrNodes() && snap_to_something);
}
-bool Inkscape::ObjectSnapper::GuidesMightSnap() const
+bool Inkscape::ObjectSnapper::GuidesMightSnap() const // almost the same as ThisSnapperMightSnap above, but only looking at points (and not paths)
{
- bool snap_to_something = _snapmanager->snapprefs.getSnapToItemNode() || _snapmanager->snapprefs.getSnapToBBoxNode();
+ bool snap_to_something = _snapmanager->snapprefs.getSnapToItemNode()
+ || _snapmanager->snapprefs.getSnapToPageBorder()
+ || (_snapmanager->snapprefs.getSnapModeBBox() && _snapmanager->snapprefs.getSnapToBBoxNode())
+ || (_snapmanager->snapprefs.getSnapModeBBox() && (_snapmanager->snapprefs.getSnapBBoxEdgeMidpoints() || _snapmanager->snapprefs.getSnapBBoxMidpoints()))
+ || (_snapmanager->snapprefs.getSnapModeNode() && (_snapmanager->snapprefs.getSnapLineMidpoints() || _snapmanager->snapprefs.getSnapObjectMidpoints()))
+ || (_snapmanager->snapprefs.getSnapModeNode() && _snapmanager->snapprefs.getIncludeItemCenter());
+
return (_snap_enabled && _snapmanager->snapprefs.getSnapModeGuide() && snap_to_something);
}
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 996804cd3a5c4001c1df381da035fb8ce686f194..ff3952c25995c766a82ce004f4dad4197811afa2 100644 (file)
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -974,7 +974,7 @@ void sp_item_snappoints(SPItem const *item, bool const target, SnapPointsWithTyp
// Get the snappoints at the item's center
if (snapprefs != NULL && snapprefs->getIncludeItemCenter()) {
- p.push_back(std::make_pair(item->getCenter(), target ? int(Inkscape::SNAPTARGET_OBJECT_MIDPOINT) : int(Inkscape::SNAPSOURCE_OBJECT_MIDPOINT)));
+ p.push_back(std::make_pair(item->getCenter(), target ? int(Inkscape::SNAPTARGET_ROTATION_CENTER) : int(Inkscape::SNAPSOURCE_ROTATION_CENTER)));
}
// Get the snappoints of clipping paths and mask, if any