diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2013-06-19 17:21:34 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2013-06-19 17:21:34 +0000 |
| commit | a3fb899bc1ae08cac5050791c9958437184b55e0 (patch) | |
| tree | 444647a2e316a13162f20041634fce7f4bf7f674 /src/sp-shape.cpp | |
| parent | changes_2013_05_22a.patch: (diff) | |
| parent | Fix my own mis-credit and some symbols labels (diff) | |
| download | inkscape-a3fb899bc1ae08cac5050791c9958437184b55e0.tar.gz inkscape-a3fb899bc1ae08cac5050791c9958437184b55e0.zip | |
merge from trunk (r12380)
(bzr r11668.1.72)
Diffstat (limited to 'src/sp-shape.cpp')
| -rw-r--r-- | src/sp-shape.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index 4037b302c..38ffbb20c 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -868,6 +868,13 @@ int SPShape::hasMarkers() const all three settings. This should be fixed later such that if 'marker' is specified, then all three should appear. */ + // Ignore markers for objects which are inside markers themselves. + for (SPObject *parent = this->parent; parent != NULL; parent = parent->parent) { + if(SP_IS_MARKER(parent)) { + return 0; + } + } + return ( this->_curve && (this->_marker[SP_MARKER_LOC] || @@ -889,8 +896,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 +921,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; } |
