ui::OptionsField match option value by ==, not >=.

I think I used >= to match baseband filter bandwidth, but then the options would all have to be in increasing order to do the right thing, which is not what another developer would expect!
This commit is contained in:
Jared Boone 2015-12-03 20:53:14 -08:00
parent 2a2e65abad
commit 42d13e6713

View File

@ -397,7 +397,7 @@ void OptionsField::set_selected_index(const size_t new_index) {
void OptionsField::set_by_value(value_t v) { void OptionsField::set_by_value(value_t v) {
size_t new_index { 0 }; size_t new_index { 0 };
for(const auto& option : options) { for(const auto& option : options) {
if( option.second >= v ) { if( option.second == v ) {
set_selected_index(new_index); set_selected_index(new_index);
break; break;
} }