diff options
| author | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-10-29 22:07:10 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-10-29 22:07:10 +0000 |
| commit | ffba6ae904deaef040defebcc0ff6f7458dbb969 (patch) | |
| tree | 7b22f9c718ce74714a0398e1b70acfaba5ad6f4e /src/snap-candidate.h | |
| parent | Dropped not working accelator key (r9858 Bug #170765) (diff) | |
| download | inkscape-ffba6ae904deaef040defebcc0ff6f7458dbb969.tar.gz inkscape-ffba6ae904deaef040defebcc0ff6f7458dbb969.zip | |
- Constrained snap: proper implementation of the preference to snap the mouse pointer or handle itself (instead of projecting it first onto the constraint)
- Fix a crash in SnapManager::multipleConstrainedSnaps
(bzr r9866)
Diffstat (limited to 'src/snap-candidate.h')
| -rw-r--r-- | src/snap-candidate.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/snap-candidate.h b/src/snap-candidate.h index 5c2834403..772800be5 100644 --- a/src/snap-candidate.h +++ b/src/snap-candidate.h @@ -38,7 +38,7 @@ public: _source_type(source), _target_type(target) { - _source_num = 0; + _source_num = -1; _target_bbox = Geom::OptRect(); } @@ -46,13 +46,14 @@ public: : _point(point), _source_type(source), _target_type(Inkscape::SNAPTARGET_UNDEFINED), - _source_num(0) + _source_num(-1) { _target_bbox = Geom::OptRect(); } inline Geom::Point const & getPoint() const {return _point;} inline Inkscape::SnapSourceType getSourceType() const {return _source_type;} + bool isSingleHandle() const {return (_source_type == SNAPSOURCE_NODE_HANDLE || _source_type == SNAPSOURCE_OTHER_HANDLE) && _source_num == -1;} inline Inkscape::SnapTargetType getTargetType() const {return _target_type;} inline long getSourceNum() const {return _source_num;} void setSourceNum(long num) {_source_num = num;} @@ -68,7 +69,9 @@ private: Inkscape::SnapSourceType _source_type; Inkscape::SnapTargetType _target_type; - //Sequence number of the source point within the set of points that is to be snapped. Starting at zero + //Sequence number of the source point within the set of points that is to be snapped. + // - Starts counting at zero, but only if there might be more points following (e.g. in the selector tool) + // - Minus one (-1) if we're sure that we have only a single point long _source_num; // If this is a target and it belongs to a bounding box, e.g. when the target type is |
