Simple Item Selector: add condition to only save index on cancel if single button mode is active
This commit is contained in:
parent
0474c2eb1f
commit
b949046236
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue