Skip to content

Commit

Permalink
Simpler #634, always use the first choice when out of bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
vsonnier committed Mar 24, 2018
1 parent 4cd8735 commit 120d394
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/forms/SDRDevices/SDRDevices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,12 @@ std::string SDRDevicesDialog::getSelectedChoiceOption(wxPGProperty* prop, const
if (choiceIndex >= 0 && choiceIndex < arg.options.size()) {
//normal selection
optionName = arg.options[choiceIndex];
} else if (choiceIndex >= arg.options.size()) {
//choose the last one of the list:
optionName = arg.options[arg.options.size() - 1];
prop->SetChoiceSelection(arg.options.size() - 1);
} else if (choiceIndex < 0) {
} else {
//choose the first one of the list:
optionName = arg.options[0];
prop->SetChoiceSelection(0);
}
}
}

return optionName;
}
Expand Down

0 comments on commit 120d394

Please sign in to comment.