diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-05-09 19:47:33 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-05-09 19:47:33 +0000 |
| commit | e312c345ba946b59dcd228d1e4d382b51aa37e9d (patch) | |
| tree | 4291cf591ca52682a00bc72341dc1d626058c6d0 /src/ui | |
| parent | Reset code to reaply (diff) | |
| download | inkscape-e312c345ba946b59dcd228d1e4d382b51aa37e9d.tar.gz inkscape-e312c345ba946b59dcd228d1e4d382b51aa37e9d.zip | |
Apply fixed
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/tool/control-point-selection.h | 5 | ||||
| -rw-r--r-- | src/ui/tool/selectable-control-point.cpp | 9 | ||||
| -rw-r--r-- | src/ui/tool/selectable-control-point.h | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/ui/tool/control-point-selection.h b/src/ui/tool/control-point-selection.h index ec845b1b3..d0cfce8d2 100644 --- a/src/ui/tool/control-point-selection.h +++ b/src/ui/tool/control-point-selection.h @@ -117,6 +117,8 @@ public: void getOriginalPoints(std::vector<Inkscape::SnapCandidatePoint> &pts); void getUnselectedPoints(std::vector<Inkscape::SnapCandidatePoint> &pts); void setOriginalPoints(); + //the purpose of this list is to keep track of first and last selected + std::list<SelectableControlPoint *> _points_list; private: // The functions below are invoked from SelectableControlPoint. @@ -140,8 +142,7 @@ private: double _rotationRadius(Geom::Point const &); set_type _points; - //the purpose of this list is to keep track of first and last selected - std::list<SelectableControlPoint *> _points_list; + set_type _all_points; INK_UNORDERED_MAP<SelectableControlPoint *, Geom::Point> _original_positions; INK_UNORDERED_MAP<SelectableControlPoint *, Geom::Affine> _last_trans; diff --git a/src/ui/tool/selectable-control-point.cpp b/src/ui/tool/selectable-control-point.cpp index f3f9c0e1e..83ed7d38b 100644 --- a/src/ui/tool/selectable-control-point.cpp +++ b/src/ui/tool/selectable-control-point.cpp @@ -87,6 +87,15 @@ bool SelectableControlPoint::clicked(GdkEventButton *event) return true; } +void SelectableControlPoint::select(bool toselect) +{ + if (toselect) { + _selection.insert(this); + } else { + _selection.erase(this); + } +} + void SelectableControlPoint::_takeSelection() { _selection.clear(); diff --git a/src/ui/tool/selectable-control-point.h b/src/ui/tool/selectable-control-point.h index 362d4addc..c16f639b1 100644 --- a/src/ui/tool/selectable-control-point.h +++ b/src/ui/tool/selectable-control-point.h @@ -28,8 +28,10 @@ public: virtual Geom::Rect bounds() const { return Geom::Rect(position(), position()); } + virtual void select(bool toselect); friend class NodeList; + protected: SelectableControlPoint(SPDesktop *d, Geom::Point const &initial_pos, SPAnchorType anchor, |
