Skip to content

Commit

Permalink
fix #15491
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Dec 9, 2024
1 parent afb6ee4 commit 13948ed
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 @@ -1724,7 +1724,18 @@ GNETLSEditorFrame::TLSDefinition::onCmdResetAll(FXObject*, FXSelector, void*) {

long
GNETLSEditorFrame::TLSDefinition::onCmdDefSwitchTLSProgram(FXObject*, FXSelector, void*) {
// just switch program
// check if program is valid (user may input arbitrary text)
bool found = false;
for (const auto& TLSDefinition : myTLSDefinitions) {
if (TLSDefinition->getProgramID() == myProgramComboBox->getText().text()) {
found = true;
break;
}
}
if (!found) {
// reset field to a valid program
myProgramComboBox->setText(myTLSDefinitions.front()->getProgramID().c_str());
}
switchProgram();
return 1;
}
Expand Down

0 comments on commit 13948ed

Please sign in to comment.