revert control_focus recording/replaying
This commit is contained in:
@@ -543,14 +543,6 @@ void cDialog::handle_events() {
|
|||||||
if(info["id"].empty()) continue;
|
if(info["id"].empty()) continue;
|
||||||
eKeyMod mods = static_cast<eKeyMod>(atoi(info["mods"].c_str()));
|
eKeyMod mods = static_cast<eKeyMod>(atoi(info["mods"].c_str()));
|
||||||
controls[info["id"]]->triggerClickHandler(*this, info["id"], mods);
|
controls[info["id"]]->triggerClickHandler(*this, info["id"], mods);
|
||||||
}else if(next_action_type() == "control_focus"){
|
|
||||||
Element& next_action = pop_next_action();
|
|
||||||
auto info = info_from_action(next_action);
|
|
||||||
if(info["id"].empty()) continue;
|
|
||||||
bool losing;
|
|
||||||
istringstream sstr(info["losing"]);
|
|
||||||
sstr >> losing;
|
|
||||||
controls[info["id"]]->triggerFocusHandler(*this, info["id"], losing);
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
while(win.pollEvent(currentEvent)) handle_one_event(currentEvent);
|
while(win.pollEvent(currentEvent)) handle_one_event(currentEvent);
|
||||||
|
|||||||
@@ -359,12 +359,6 @@ bool cControl::triggerClickHandler(cDialog& dlg, std::string id, eKeyMod mods){
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool cControl::triggerFocusHandler(cDialog& dlg, std::string id, bool losing){
|
bool cControl::triggerFocusHandler(cDialog& dlg, std::string id, bool losing){
|
||||||
if(recording){
|
|
||||||
std::stringstream sstr;
|
|
||||||
sstr << losing;
|
|
||||||
std::map<std::string, std::string> action_info = {{"id", id}, {"losing", sstr.str()}};
|
|
||||||
record_action("control_focus", action_info);
|
|
||||||
}
|
|
||||||
if(losing) return triggerEvent<EVT_DEFOCUS>(dlg, id);
|
if(losing) return triggerEvent<EVT_DEFOCUS>(dlg, id);
|
||||||
triggerEvent<EVT_FOCUS>(dlg, id);
|
triggerEvent<EVT_FOCUS>(dlg, id);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user