Skip to content

Commit

Permalink
fix #16053
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Jan 21, 2025
1 parent e53882a commit f15ee0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/netedit/GNENetHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2417,9 +2417,11 @@ GNENetHelper::AttributeCarriers::deleteCrossing(GNECrossing* crossing) {
myCrossings.erase(finder);
myNumberOfNetworkElements--;
// remove it from inspected elements and GNEElementTree
myNet->getViewNet()->getInspectedElements().uninspectAC(crossing);
crossing->unmarkForDrawingFront();;
myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(crossing);
if (myNet->getViewNet()) {
myNet->getViewNet()->getInspectedElements().uninspectAC(crossing);
crossing->unmarkForDrawingFront();;
myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(crossing);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/netedit/elements/network/GNEJunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ GNEJunction::rebuildGNECrossings(bool rebuildNBNodeCrossings) {
crossing->unselectAttributeCarrier();
}
// remove it from inspected ACS
myNet->getViewNet()->getInspectedElements().uninspectAC(crossing);
if (myNet->getViewNet()) {
myNet->getViewNet()->getInspectedElements().uninspectAC(crossing);
}
// remove it from net
myNet->removeGLObjectFromGrid(crossing);
// remove it from attributeCarriers
Expand Down

0 comments on commit f15ee0a

Please sign in to comment.