Skip to content

Commit

Permalink
Fixed #14355
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Mar 2, 2024
1 parent 8279386 commit bbb4dce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/netedit/frames/network/GNECreateEdgeFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,10 @@ GNECreateEdgeFrame::processClick(const Position& clickedPosition, const GNEViewN
} else if (!myLaneTypeAttributes->areValuesValid()) {
WRITE_WARNING(TL("Invalid lane attributes"));
} else {
// if grid is enabled and currently there isn't a junction under mouse, make a new search snapping position to grid
if ((viewObjects.getJunctionFront() == nullptr) && myViewNet->getVisualisationSettings().showGrid) {
myViewNet->updateObjectsInPosition(myViewNet->snapToActiveGrid(clickedPosition));
}
// obtain junction depending of gridEnabled
GNEJunction* junction = viewObjects.getJunctionFront();
// begin undo list
Expand Down

0 comments on commit bbb4dce

Please sign in to comment.