summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:55:01 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-05-09 19:42:10 +0000
commit61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778 (patch)
tree3ed5e5b78b00cf25892a3a18e118eee41cbc15ec /src/ui
parentFix typo (diff)
downloadinkscape-61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778.tar.gz
inkscape-61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778.zip
Start migrating 0.92 patch to master
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/tool/control-point-selection.h5
-rw-r--r--src/ui/tool/selectable-control-point.cpp9
-rw-r--r--src/ui/tool/selectable-control-point.h2
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,