From dd30de233b38518008030c2c0a2366332422b236 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 6 May 2013 02:54:50 +0200 Subject: Removed auto select nodes, not decide for the user. Added auto update all selected handles when drag (bzr r11950.1.111) --- src/ui/tool/node.cpp | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'src/ui/tool/node.cpp') diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index d342d6c3d..1d7b5850f 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -216,8 +216,15 @@ void Handle::move(Geom::Point const &new_pos) h = this; setPosition(_pm().BSplineHandleReposition(h)); _parent->bsplineWeight = _pm().BSplineHandlePosition(h); - h2 = this->other(); - this->other()->setPosition(_pm().BSplineHandleReposition(h2,_parent->bsplineWeight)); + typedef ControlPointSelection::Set Set; + Set &nodes = _parent->_selection.allPoints(); + for (Set::iterator i = nodes.begin(); i != nodes.end(); ++i) { + Node *n = static_cast(*i); + h = n->front(); + h2 = n->back(); + h->setPosition(_pm().BSplineHandleReposition(h,_parent->bsplineWeight)); + h2->setPosition(_pm().BSplineHandleReposition(h2,_parent->bsplineWeight)); + } } //BSpline End } @@ -463,33 +470,11 @@ void Handle::ungrabbed(GdkEventButton *event) _drag_out = false; _pm()._handleUngrabbed(); - //BSpline - if(_pm().isBSpline){ - typedef ControlPointSelection::Set Set; - Set &nodes = _parent->_selection.allPoints(); - for (Set::iterator i = nodes.begin(); i != nodes.end(); ++i) { - Node *n = static_cast(*i); - _parent->_selection.erase(n); - } - _parent->_selection.insert(_parent); - } - //BSpline End } bool Handle::clicked(GdkEventButton *event) { _pm()._handleClicked(this, event); - //BSpline - if(_pm().isBSpline){ - typedef ControlPointSelection::Set Set; - Set &nodes = _parent->_selection.allPoints(); - for (Set::iterator i = nodes.begin(); i != nodes.end(); ++i) { - Node *n = static_cast(*i); - _parent->_selection.erase(n); - } - _parent->_selection.insert(_parent); - } - //BSpline End return true; } -- cgit v1.2.3