diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-03-21 09:53:39 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Zenotz <jtx@jtx.marker.es> | 2013-03-21 09:53:39 +0000 |
| commit | a60fc5880c9bab8bf471c2ef808499182201b621 (patch) | |
| tree | 32aab29888a983f4c1692481059961d1fab68a47 /src/ui/tool/path-manipulator.cpp | |
| parent | Fixed redraw handles at node delete (diff) | |
| download | inkscape-a60fc5880c9bab8bf471c2ef808499182201b621.tar.gz inkscape-a60fc5880c9bab8bf471c2ef808499182201b621.zip | |
Fixing errors at delete extrewmiuns nodes
(bzr r11950.1.65)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
| -rw-r--r-- | src/ui/tool/path-manipulator.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index 431cc2d96..571e6dd7a 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -1197,13 +1197,19 @@ double PathManipulator::BSplineHandlePosition(Handle *h){ double pos = 0; Node *n = h->parent(); SPCurve *lineInsideNodes = new SPCurve(); - Node * nextNode = n->nodeToward(h); - Geom::Point positionH = h->position(); - positionH = Geom::Point(positionH[X] - 0.0625,positionH[Y] - 0.0625); - if(nextNode && n->position() != h->position()){ - lineInsideNodes->moveto(n->position()); - lineInsideNodes->lineto(nextNode->position()); - pos = Geom::nearest_point(positionH,*lineInsideNodes->first_segment()); + Node * nextNode = NULL; + try{ + nextNode = n->nodeToward(h); + }catch( char * str ) { + } + if(nextNode){ + Geom::Point positionH = h->position(); + positionH = Geom::Point(positionH[X] - 0.0625,positionH[Y] - 0.0625); + if(nextNode && n->position() != h->position()){ + lineInsideNodes->moveto(n->position()); + lineInsideNodes->lineto(nextNode->position()); + pos = Geom::nearest_point(positionH,*lineInsideNodes->first_segment()); + } } return pos; } @@ -1220,7 +1226,11 @@ Geom::Point PathManipulator::BSplineHandleReposition(Handle *h,double pos){ Node *n = h->parent(); Geom::D2< Geom::SBasis > SBasisInsideNodes; SPCurve *lineInsideNodes = new SPCurve(); - Node * nextNode = n->nodeToward(h); + Node * nextNode = NULL; + try{ + nextNode = n->nodeToward(h); + }catch( char * str ) { + } if(nextNode && pos != 0){ lineInsideNodes->moveto(n->position()); lineInsideNodes->lineto(nextNode->position()); |
