Automatically trigger the focus handler for the active field when toasting the dialog, and don't toast if the handler returns false

- But provide an option to skip this step, for the purpose of cancel buttons
This commit is contained in:
2014-12-04 13:48:50 -05:00
parent 7e07d195f9
commit 04cba387d5
12 changed files with 97 additions and 100 deletions

View File

@@ -967,7 +967,7 @@ static bool display_item_event_filter(cDialog& me, std::string id, eKeyMod) {
cItemRec item;
if(id == "done") {
me.toast();
me.toast(true);
} else if(id == "up") {
if(first_item_shown > 0) {
first_item_shown -= 8;
@@ -1430,7 +1430,7 @@ void refresh_store_items()
static bool get_text_response_event_filter(cDialog& me, std::string, eKeyMod) {
me.toast();
me.toast(true);
me.setResult(me["response"].getText());
return true;
}