summaryrefslogtreecommitdiffstats
path: root/src/snapper.h
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2009-01-31 13:51:52 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2009-01-31 13:51:52 +0000
commit07d32ff9bade493f2549e8e90c32d11ba12b199d (patch)
treee23af978f1919af10ac80d315f90d8323bb2d0ee /src/snapper.h
parent* [INTL:pl] Further small updates to the Polish translation (diff)
downloadinkscape-07d32ff9bade493f2549e8e90c32d11ba12b199d.tar.gz
inkscape-07d32ff9bade493f2549e8e90c32d11ba12b199d.zip
Store the snapper tolerances in the snap-preferences instead of in each snapper individualy. This way we don't have to update all snappers when the namedview has been updated (and we can get rid of the _update_snap_distances() call)
(bzr r7208)
Diffstat (limited to 'src/snapper.h')
-rw-r--r--src/snapper.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/snapper.h b/src/snapper.h
index 7bea9b423..fc4b30ba0 100644
--- a/src/snapper.h
+++ b/src/snapper.h
@@ -45,14 +45,12 @@ public:
Snapper(SnapManager *sm, ::Geom::Coord const t);
virtual ~Snapper() {}
- void setSnapperTolerance(Geom::Coord t);
- Geom::Coord getSnapperTolerance() const; //returns the tolerance of the snapper in screen pixels (i.e. independent of zoom)
- bool getSnapperAlwaysSnap() const; //if true, then the snapper will always snap, regardless of its tolerance
+ virtual Geom::Coord getSnapperTolerance() const {}; //returns the tolerance of the snapper in screen pixels (i.e. independent of zoom)
+ virtual bool getSnapperAlwaysSnap() const {}; //if true, then the snapper will always snap, regardless of its tolerance
/**
* \return true if this Snapper will snap at least one kind of point.
*/
- //virtual bool ThisSnapperMightSnap() const;
virtual bool ThisSnapperMightSnap() const {return _snap_enabled;} // will likely be overridden by derived classes
void setEnabled(bool s); // This is only used for grids, for which snapping can be enabled individually
@@ -109,11 +107,6 @@ protected:
bool _snap_enabled; ///< true if this snapper is enabled, otherwise false
// This is only used for grids, for which snapping can be enabled individually
-
-private:
- Geom::Coord _snapper_tolerance; ///< snap tolerance in desktop coordinates
- // must be private to enforce the usage of getTolerance(), which retrieves
- // the tolerance in screen pixels (making it zoom independent)
};
}