Skip to content

Commit

Permalink
fixing crash related to selection status and undo/redo refs #457
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/behr_mi/git/sumo_synched/trunk/sumo@21427 afbd958f-9f77-42d5-a016-97a22340ccf4
  • Loading branch information
namdre committed Sep 5, 2016
1 parent 07c37ec commit 6cf4531
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/netedit/GNENet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,8 @@ GNENet::deleteSingleJunction(GNEJunction* junction) {
myNetBuilder->getNodeCont().extract(junction->getNBNode());
junction->decRef("GNENet::deleteSingleJunction");
junction->setResponsible(true);
// selection status is lost when removing junction via undo and the selection operation was not part of a command group
gSelected.deselect(junction->getGlID());
update();
}

Expand All @@ -1206,6 +1208,8 @@ GNENet::deleteSingleEdge(GNEEdge* edge) {
myNetBuilder->getDistrictCont(), edge->getNBEdge());
edge->decRef("GNENet::deleteSingleEdge");
edge->setResponsible(true);
// selection status is lost when removing edge via undo and the selection operation was not part of a command group
gSelected.deselect(edge->getGlID());
// invalidate junction logic
update();
}
Expand Down

0 comments on commit 6cf4531

Please sign in to comment.