diff --git a/src/guide-snapper.cpp b/src/guide-snapper.cpp
index e247c0451ae843dfd1c7039d738fbcca7ffe96d1..1e4eb02d835e49541de517e29900d7198587f292 100644 (file)
--- a/src/guide-snapper.cpp
+++ b/src/guide-snapper.cpp
* Frank Felfe <innerspace@iname.com>
* Carl Hetherington <inkscape@carlh.net>
*
- * Copyright (C) 1999-2002 Authors
+ * Copyright (C) 1999-2002 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
Inkscape::GuideSnapper::LineList Inkscape::GuideSnapper::_getSnapLines(NR::Point const &p) const
{
LineList s;
-
+
+ if ( NULL == _named_view || ThisSnapperMightSnap() == false) {
+ return s;
+ }
+
for (GSList const *l = _named_view->guides; l != NULL; l = l->next) {
SPGuide const *g = SP_GUIDE(l->data);
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++