diff options
Diffstat (limited to 'src/guide-snapper.cpp')
| -rw-r--r-- | src/guide-snapper.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/guide-snapper.cpp b/src/guide-snapper.cpp index a05ecd3e6..9fd13705c 100644 --- a/src/guide-snapper.cpp +++ b/src/guide-snapper.cpp @@ -26,7 +26,7 @@ Inkscape::GuideSnapper::LineList Inkscape::GuideSnapper::_getSnapLines(NR::Point { LineList s; - if ( NULL == _named_view ) { + if ( NULL == _named_view || willSnapSomething() == 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::willSnapSomething() const +{ + return _named_view == NULL ? false : (_enabled && _snap_to != 0 && _named_view->showguides); +} + /* Local Variables: mode:c++ |
