Skip to content

Commit

Permalink
Fixed #14315
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Feb 23, 2024
1 parent 1c58ed6 commit b007a85
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/netedit/elements/GNEContour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ GNEContour::getContourBoundary() const {

void
GNEContour::clearContour() {
myDottedGeometries->clear();
for (int i = 0; i < 3; i++) {
myDottedGeometries->at(i).clearDottedGeometry();
}
myContourBoundary->reset();
myCalculatedShape->clear();
}
Expand Down
7 changes: 7 additions & 0 deletions src/utils/gui/div/GUIDottedGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ GUIDottedGeometry::getUnresampledShape() const {
}


void
GUIDottedGeometry::clearDottedGeometry() {
myDottedGeometrySegments.clear();
myUnresampledShape.clear();
}


void
GUIDottedGeometry::calculateShapeRotationsAndLengths() {
// iterate over all segments
Expand Down
3 changes: 3 additions & 0 deletions src/utils/gui/div/GUIDottedGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ class GUIDottedGeometry {
/// @brief get simple shape (the shape without resampling)
const PositionVector& getUnresampledShape() const;

/// @brief clear dotted geometry
void clearDottedGeometry();

private:
/// @brief calculate shape rotations and lengths
void calculateShapeRotationsAndLengths();
Expand Down

0 comments on commit b007a85

Please sign in to comment.