diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-05-28 23:40:58 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Zenotz <jtx@jtx.marker.es> | 2013-05-28 23:40:58 +0000 |
| commit | cc0fcb1deab53239f13f871e1765316c737d103c (patch) | |
| tree | fd1ee7254b19ceffd241251fa0c225130cd23c87 /src/sp-shape.cpp | |
| parent | Fixed a error that handles all kinds of pathas as bsplines (diff) | |
| parent | extensions. dxf input. create default layer 0 if it does not exist (Bug 1123907) (diff) | |
| download | inkscape-cc0fcb1deab53239f13f871e1765316c737d103c.tar.gz inkscape-cc0fcb1deab53239f13f871e1765316c737d103c.zip | |
update to trunk
(bzr r11950.1.120)
Diffstat (limited to 'src/sp-shape.cpp')
| -rw-r--r-- | src/sp-shape.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index 4037b302c..be9f5388c 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -889,8 +889,8 @@ int SPShape::numberOfMarkers(int type) if (pathv.size() == 0) { return 0; } - switch(type) { + case SP_MARKER_LOC: { if ( this->_marker[SP_MARKER_LOC] ) { @@ -914,7 +914,9 @@ int SPShape::numberOfMarkers(int type) for(Geom::PathVector::const_iterator path_it = pathv.begin(); path_it != pathv.end(); ++path_it) { n += path_it->size_default() + 1; } - return n - 2; // minus the start and end marker. + n = (n > 1) ? (n - 2) : 0; // Minus the start and end marker, but never negative. + // A path or polyline may have only one point. + return n; } else { return 0; } |
