Change default action of delete/dismiss buttons when deleting the last item.

Now stop closing the dialog, because it may have other functions even
with no items, and this also prevent closing when using filtered view
only showing the item(s) to delete (which is much more common, who
delete/dismiss everything?)
This commit is contained in:
Ali El Gariani 2008-07-06 22:31:11 +00:00
parent c59e1f5a7d
commit 2226e84d88

View File

@ -814,12 +814,14 @@ void dialog::action(dialog_process_info& info)
if(selection >= 0) {
menu_ref.erase_item(selection);
}
if(menu_ref.nitems() == 0) {
set_result(CLOSE_DIALOG);
} else {
set_result(CONTINUE_DIALOG);
info.first_time = true;
}
// was used before to auto close empty menu
//if(menu_ref.nitems() == 0) {
// set_result(CLOSE_DIALOG);
//} else {
set_result(CONTINUE_DIALOG);
info.first_time = true;
}
}