diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-26 08:53:47 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-26 08:53:47 +0000 |
| commit | 6186adb3c521bcbaede219e6c86ab34fa9077c5d (patch) | |
| tree | a025ae6bc2d8a2710c3b2eb1c01643e1fa485531 /src | |
| parent | remove no longer relevant comment (diff) | |
| download | inkscape-6186adb3c521bcbaede219e6c86ab34fa9077c5d.tar.gz inkscape-6186adb3c521bcbaede219e6c86ab34fa9077c5d.zip | |
interpret snapping distance in screen pixels independent of zoom
(bzr r2762)
Diffstat (limited to 'src')
| -rw-r--r-- | src/snapper.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/snapper.cpp b/src/snapper.cpp index 723213afe..3d5b33c16 100644 --- a/src/snapper.cpp +++ b/src/snapper.cpp @@ -10,6 +10,8 @@ #include "libnr/nr-values.h" #include "sp-namedview.h" +#include "inkscape.h" +#include "desktop.h" Inkscape::Snapper::PointType const Inkscape::Snapper::BBOX_POINT = 0x1; Inkscape::Snapper::PointType const Inkscape::Snapper::SNAP_POINT = 0x2; @@ -37,11 +39,11 @@ void Inkscape::Snapper::setDistance(NR::Coord const d) } /** - * \return Snap distance (desktop coordinates) + * \return Snap distance (desktop coordinates); depends on current zoom so that it's always the same in screen pixels */ NR::Coord Inkscape::Snapper::getDistance() const { - return _distance; + return _distance / SP_ACTIVE_DESKTOP->current_zoom(); } /** |
