diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-05-08 17:26:29 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-05-08 17:26:29 +0000 |
| commit | f31b2c75e1313ccceeb6d33cc14aa545d4d370f9 (patch) | |
| tree | 444b38fe397f34ee5c298ed0efd5cc9f49afb7cf /src/ui/tools/pen-tool.cpp | |
| parent | More helper/geom.h pruning. (diff) | |
| parent | cmake: Bring cmake installation in line with autotools (bug #1451481) (diff) | |
| download | inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.tar.gz inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.zip | |
Merge from trunk
(bzr r14059.2.11)
Diffstat (limited to 'src/ui/tools/pen-tool.cpp')
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index 3eb838089..38892517d 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -761,14 +761,12 @@ bool PenTool::_handleButtonRelease(GdkEventButton const &revent) { } } this->state = PenTool::CONTROL; - ret = true; break; case PenTool::CONTROL: // End current segment this->_endpointSnap(p, revent.state); this->_finishSegment(p, revent.state); this->state = PenTool::POINT; - ret = true; break; case PenTool::CLOSE: // End current segment @@ -782,12 +780,10 @@ bool PenTool::_handleButtonRelease(GdkEventButton const &revent) { } this->_finish(true); this->state = PenTool::POINT; - ret = true; break; case PenTool::STOP: // This is allowed, if we just canceled curve this->state = PenTool::POINT; - ret = true; break; default: break; @@ -822,7 +818,6 @@ bool PenTool::_handleButtonRelease(GdkEventButton const &revent) { break; } this->state = PenTool::POINT; - ret = true; break; default: break; @@ -1431,8 +1426,7 @@ void PenTool::_bsplineSpiroStartAnchorOn() { using Geom::X; using Geom::Y; - SPCurve *tmp_curve = new SPCurve(); - tmp_curve = this->sa->curve->copy(); + SPCurve *tmp_curve = this->sa->curve->copy(); if(this->sa->start) tmp_curve = tmp_curve ->create_reverse(); Geom::CubicBezier const * cubic = dynamic_cast<Geom::CubicBezier const*>(&*tmp_curve ->last_segment()); @@ -1464,8 +1458,7 @@ void PenTool::_bsplineSpiroStartAnchorOn() void PenTool::_bsplineSpiroStartAnchorOff() { - SPCurve *tmp_curve = new SPCurve(); - tmp_curve = this->sa->curve->copy(); + SPCurve *tmp_curve = this->sa->curve->copy(); if(this->sa->start) tmp_curve = tmp_curve ->create_reverse(); Geom::CubicBezier const * cubic = dynamic_cast<Geom::CubicBezier const*>(&*tmp_curve ->last_segment()); @@ -1563,7 +1556,7 @@ void PenTool::_bsplineSpiroEndAnchorOn() using Geom::Y; this->p[2] = this->p[3] + (1./3)*(this->p[0] - this->p[3]); this->p[2] = Geom::Point(this->p[2][X] + HANDLE_CUBIC_GAP,this->p[2][Y] + HANDLE_CUBIC_GAP); - SPCurve *tmp_curve = new SPCurve(); + SPCurve *tmp_curve; SPCurve *last_segment = new SPCurve(); Geom::Point point_c(0,0); bool reverse = false; @@ -1620,7 +1613,7 @@ void PenTool::_bsplineSpiroEndAnchorOn() void PenTool::_bsplineSpiroEndAnchorOff() { - SPCurve *tmp_curve = new SPCurve(); + SPCurve *tmp_curve; SPCurve *last_segment = new SPCurve(); bool reverse = false; this->p[2] = this->p[3]; |
