diff options
| author | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
| commit | 5a4fb2325f60d292b47330f540b26a3279341c90 (patch) | |
| tree | d2aa7967be25450b83e625025366c618101ae49f /src/snap.cpp | |
| parent | The Polar Arrange Tab of the Arrange Dialog now hides the parametric (diff) | |
| parent | Remove Snap menu item and improve grid menu item text (diff) | |
| download | inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.tar.gz inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.zip | |
Commit a merge to trunk, with probabal errors
(bzr r11073.1.36)
Diffstat (limited to 'src/snap.cpp')
| -rw-r--r-- | src/snap.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index e059bbe13..ecf799cdc 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -32,7 +32,7 @@ #include "selection.h" #include "sp-guide.h" #include "preferences.h" -#include "event-context.h" +#include "ui/tools/tool-base.h" #include "util/mathfns.h" using std::vector; using Inkscape::Util::round_to_upper_multiple_plus; @@ -46,6 +46,7 @@ SnapManager::SnapManager(SPNamedView const *v) : _rotation_center_source_items(NULL), _guide_to_ignore(NULL), _desktop(NULL), + _snapindicator(true), _unselected_nodes(NULL) { } @@ -76,9 +77,14 @@ SnapManager::SnapperList SnapManager::getGridSnappers() const return s; } -bool SnapManager::someSnapperMightSnap() const +bool SnapManager::someSnapperMightSnap(bool immediately) const { - if ( !snapprefs.getSnapEnabledGlobally() || snapprefs.getSnapPostponedGlobally() ) { + if ( !snapprefs.getSnapEnabledGlobally() ) { + return false; + } + + // If we're asking if some snapper might snap RIGHT NOW (without the snap being postponed)... + if ( immediately && snapprefs.getSnapPostponedGlobally() ) { return false; } @@ -494,7 +500,6 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed( /* The current best metric for the best transformation; lower is better, Geom::infinity() ** means that we haven't snapped anything. */ - Geom::Point best_scale_metric(Geom::infinity(), Geom::infinity()); Inkscape::SnappedPoint best_snapped_point; g_assert(best_snapped_point.getAlwaysSnap() == false); // Check initialization of snapped point g_assert(best_snapped_point.getAtIntersection() == false); |
