Skip to content

Commit

Permalink
Minor update in GNETLSEditorFrame. Refs #9072
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed May 5, 2022
1 parent b8f3c2f commit ea6b97e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/netedit/frames/network/GNETLSEditorFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,18 @@ GNETLSEditorFrame::onCmdDefDelete(FXObject*, FXSelector, void*) {

long
GNETLSEditorFrame::onCmdDefRegenerate(FXObject*, FXSelector, void*) {

// make a copy of the junction
GNEJunction* junction = myTLSJunction->getCurrentJunction();
// begin undo
myViewNet->getUndoList()->begin(GUIIcon::MODETLS, "regenerate TLS");
// delete junction
onCmdDefDelete(nullptr, 0, nullptr);
// set junction again
myTLSJunction->setCurrentJunction(junction);
// create junction
onCmdDefCreate(nullptr, 0, nullptr);
// end undo
myViewNet->getUndoList()->end();
return 1;
}

Expand Down

0 comments on commit ea6b97e

Please sign in to comment.