Code

Filter effects dialog:
[inkscape.git] / src / guide-snapper.cpp
index a05ecd3e6b4423c517710c83b21965540dd0d5f9..1e4eb02d835e49541de517e29900d7198587f292 100644 (file)
@@ -26,7 +26,7 @@ Inkscape::GuideSnapper::LineList Inkscape::GuideSnapper::_getSnapLines(NR::Point
 {
     LineList s;
 
-    if ( NULL == _named_view ) {
+    if ( NULL == _named_view || ThisSnapperMightSnap() == false) {
         return s;
     }
 
@@ -44,6 +44,14 @@ Inkscape::GuideSnapper::LineList Inkscape::GuideSnapper::_getSnapLines(NR::Point
     return s;
 }
 
+/**
+ *  \return true if this Snapper will snap at least one kind of point.
+ */
+bool Inkscape::GuideSnapper::ThisSnapperMightSnap() const
+{
+    return _named_view == NULL ? false : (_enabled && _snap_to != 0 && _named_view->showguides);
+}
+
 /*
   Local Variables:
   mode:c++