summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/control-point-selection.cpp
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-10-09 09:33:17 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2019-10-09 22:28:43 +0000
commit34112c936cafb5bba11376f67c5d11af3601dc43 (patch)
tree2227e0c06ce9b40a0ea67efcd1b707d4ae567474 /src/ui/tool/control-point-selection.cpp
parentSpeed up multi-node (de)selection (diff)
downloadinkscape-34112c936cafb5bba11376f67c5d11af3601dc43.tar.gz
inkscape-34112c936cafb5bba11376f67c5d11af3601dc43.zip
Make sure old calls to insert behaves the same
Diffstat (limited to 'src/ui/tool/control-point-selection.cpp')
-rw-r--r--src/ui/tool/control-point-selection.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/tool/control-point-selection.cpp b/src/ui/tool/control-point-selection.cpp
index ca81a75a0..a20a54c74 100644
--- a/src/ui/tool/control-point-selection.cpp
+++ b/src/ui/tool/control-point-selection.cpp
@@ -76,7 +76,7 @@ ControlPointSelection::~ControlPointSelection()
}
/** Add a control point to the selection. */
-std::pair<ControlPointSelection::iterator, bool> ControlPointSelection::insert(const value_type &x, bool notify)
+std::pair<ControlPointSelection::iterator, bool> ControlPointSelection::insert(const value_type &x, bool notify, bool to_update)
{
iterator found = _points.find(x);
if (found != _points.end()) {
@@ -88,8 +88,10 @@ std::pair<ControlPointSelection::iterator, bool> ControlPointSelection::insert(c
x->updateState();
- if (notify) {
+ if (to_update) {
_update();
+ }
+ if (notify) {
signal_selection_changed.emit(std::vector<key_type>(1, x), true);
}
@@ -148,7 +150,7 @@ void ControlPointSelection::clear()
void ControlPointSelection::selectAll()
{
for (auto _all_point : _all_points) {
- insert(_all_point, false);
+ insert(_all_point, false, false);
}
std::vector<SelectableControlPoint *> out(_all_points.begin(), _all_points.end());
if (!out.empty()) {
@@ -162,7 +164,7 @@ void ControlPointSelection::selectArea(Geom::Rect const &r)
std::vector<SelectableControlPoint *> out;
for (auto _all_point : _all_points) {
if (r.contains(*_all_point)) {
- insert(_all_point, false);
+ insert(_all_point, false, false);
out.push_back(_all_point);
}
}
@@ -182,7 +184,7 @@ void ControlPointSelection::invertSelection()
}
else {
out.push_back(_all_point);
- insert(_all_point, false);
+ insert(_all_point, false, false);
}
}
_update();