Skip to content

Commit

Permalink
Fixed problem moving junction contours. Refs #14175
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Jan 5, 2024
1 parent 1d2741c commit 9c28754
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/netedit/elements/GNEContour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ GNEContour::getContourBoundary() const {
}


void
GNEContour::clearContour() {
myDottedGeometries->clear();
myContourBoundary->reset();
myCalculatedShape->clear();
}


void
GNEContour::calculateContourClosedShape(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d,
const GUIGlObject* glObject, const PositionVector& shape, const double scale) const {
Expand Down
4 changes: 2 additions & 2 deletions src/netedit/elements/GNEContour.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class GNEContour {
/// @brief get contour boundary
Boundary getContourBoundary() const;

/// @brief get calculated shape
const PositionVector &getCalculatedShape() const;
/// @brief void clear contour
void clearContour();

/// @brief calculate contours
/// @{
Expand Down
2 changes: 2 additions & 0 deletions src/netedit/elements/network/GNEJunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1894,6 +1894,8 @@ GNEJunction::setAttribute(SumoXMLAttr key, const std::string& value) {

void
GNEJunction::setMoveShape(const GNEMoveResult& moveResult) {
// clear contour
myNetworkElementContour.clearContour();
// set new position in NBNode without updating grid
if (isShapeEdited()) {
// set new shape
Expand Down

0 comments on commit 9c28754

Please sign in to comment.