diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-01-01 18:37:59 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-01-01 18:37:59 +0000 |
| commit | 4481a38120d986d3a8343bb6c386540161543576 (patch) | |
| tree | 7f3c92fec1bd8cb3db517968125acb3f245023a6 /src/ui | |
| parent | Allow reposition of BSpline using the path (diff) | |
| download | inkscape-4481a38120d986d3a8343bb6c386540161543576.tar.gz inkscape-4481a38120d986d3a8343bb6c386540161543576.zip | |
simplify and optimice code for mobe bspline from paths
(bzr r13831)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/tool/curve-drag-point.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/ui/tool/curve-drag-point.cpp b/src/ui/tool/curve-drag-point.cpp index c27e4b5ee..49c949107 100644 --- a/src/ui/tool/curve-drag-point.cpp +++ b/src/ui/tool/curve-drag-point.cpp @@ -94,14 +94,18 @@ void CurveDragPoint::dragged(Geom::Point &new_pos, GdkEventMotion *event) if(!_pm.isBSpline(false)){ first->front()->move(first->front()->position() + offset0); second->back()->move(second->back()->position() + offset1); - }else if(weight>=0.8 && held_shift(*event)){ - second->back()->move(new_pos); - }else if(weight<=0.2 && held_shift(*event)){ - first->front()->move(new_pos); - }else if(weight>=0.7){ - second->move(second->position() + delta); - }else if(weight<=0.3){ - first->move(first->position() + delta); + }else if(weight>=0.8){ + if(held_shift(*event)){ + second->back()->move(new_pos); + } else { + second->move(second->position() + delta); + } + }else if(weight<=0.2){ + if(held_shift(*event)){ + first->back()->move(new_pos); + } else { + first->move(first->position() + delta); + } }else{ first->move(first->position() + delta); second->move(second->position() + delta); |
