diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-01-18 20:00:19 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-01-18 20:00:19 +0000 |
| commit | 644f4f4a93a81735fb8265907533308df80d6b11 (patch) | |
| tree | 47a80b1dc162b88a063b295dbae920cc2a668e93 /src/snap.cpp | |
| parent | snap indicator: try a diamond shaped indicator for snapping to nodes. see how... (diff) | |
| download | inkscape-644f4f4a93a81735fb8265907533308df80d6b11.tar.gz inkscape-644f4f4a93a81735fb8265907533308df80d6b11.zip | |
- Snap to the midpoint of shapes and bboxes
- Snap to the midpoint of paths and bbox edges
- Refactor the snapping toggle, i.e. what snaps to what when toggling a specific option in the snapping toolbar
PS: icons.svg has been modified, so use "make install" if needed
(bzr r7144)
Diffstat (limited to 'src/snap.cpp')
| -rw-r--r-- | src/snap.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index a6c4b8729..24cfefe0b 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -108,6 +108,25 @@ bool SnapManager::someSnapperMightSnap() const } /** + * \return true if one of the snappers will try to snap something. + */ + +bool SnapManager::gridSnapperMightSnap() const +{ + if ( !snapprefs.getSnapEnabledGlobally() || snapprefs.getSnapPostponedGlobally() ) { + return false; + } + + SnapperList const s = getGridSnappers(); + SnapperList::const_iterator i = s.begin(); + while (i != s.end() && (*i)->ThisSnapperMightSnap() == false) { + i++; + } + + return (i != s.end()); +} + +/** * Try to snap a point to any of the specified snappers. * * \param point_type Type of point. |
