Made cancel state sensitive

develop
PatrikLundell 2018-08-18 18:03:00 +02:00
parent 2ed6469be8
commit 73e7ffff83
1 changed files with 7 additions and 3 deletions

@ -103,9 +103,13 @@ namespace embark_assist {
state->embark_update(); state->embark_update();
} }
else if (input->count(df::interface_key::CUSTOM_C)) { else if (input->count(df::interface_key::CUSTOM_C)) {
state->match_active = false; if (state->matching) {
state->matching = false; state->matching = false;
state->clear_match_callback(); }
else {
state->match_active = false;
state->clear_match_callback();
}
} }
else if (input->count(df::interface_key::CUSTOM_F)) { else if (input->count(df::interface_key::CUSTOM_F)) {
if (!state->match_active && !state->matching) { if (!state->match_active && !state->matching) {