Skip to content

Commit

Permalink
Simple Item Selector: add condition to only save index on cancel if s…
Browse files Browse the repository at this point in the history
…ingle button mode is active
  • Loading branch information
Vultraz committed Feb 23, 2017
1 parent 0474c2e commit b949046
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/dialogs/simple_item_selector.cpp
Expand Up @@ -120,7 +120,9 @@ void simple_item_selector::pre_show(window& window)

void simple_item_selector::post_show(window& window)
{
index_ = find_widget<listbox>(&window, "listbox", false).get_selected_row();
if(get_retval() == window::OK || single_button_) {
index_ = find_widget<listbox>(&window, "listbox", false).get_selected_row();
}
}

} // namespace dialogs
Expand Down

0 comments on commit b949046

Please sign in to comment.