Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

bool SnapManager::someSnapperMightSnap (  ) const

Return true if any snapping might occur, whether its to grids, guides or objects.

Each snapper instance handles its own snapping target, e.g. grids, guides or objects. This method iterates through all these snapper instances and returns true if any of the snappers might possible snap, considering only the relevant snapping preferences.

true if one of the snappers will try to snap to something.

Definition at line 114 of file snap.cpp.

References getSnappers().

Referenced by _snapTransformed(), constrainedSnap(), Inkscape::UI::RotationCenter::dragged(), Inkscape::UI::Node::dragged(), Inkscape::UI::Handle::dragged(), and freeSnap().

    if ( !snapprefs.getSnapEnabledGlobally() || snapprefs.getSnapPostponedGlobally() ) {
        return false;

    SnapperList const s = getSnappers();
    SnapperList::const_iterator i = s.begin();
    while (i != s.end() && (*i)->ThisSnapperMightSnap() == false) {

    return (i != s.end());

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index