Protection
This commit is contained in:
+6
-3
@@ -154,16 +154,19 @@ void FormGroup::onEvent(event_t event)
|
|||||||
TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString("FormGroup").c_str(), event);
|
TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString("FormGroup").c_str(), event);
|
||||||
|
|
||||||
if (event == EVT_KEY_BREAK(KEY_ENTER)) {
|
if (event == EVT_KEY_BREAK(KEY_ENTER)) {
|
||||||
first->setFocus(SET_FOCUS_FIRST);
|
if (first)
|
||||||
|
first->setFocus(SET_FOCUS_FIRST);
|
||||||
}
|
}
|
||||||
else if (event == EVT_KEY_BREAK(KEY_EXIT) && !hasFocus() && !(windowFlags & FORM_FORWARD_FOCUS)) {
|
else if (event == EVT_KEY_BREAK(KEY_EXIT) && !hasFocus() && !(windowFlags & FORM_FORWARD_FOCUS)) {
|
||||||
setFocus(SET_FOCUS_DEFAULT);
|
setFocus(SET_FOCUS_DEFAULT);
|
||||||
}
|
}
|
||||||
else if (event == EVT_ROTARY_RIGHT && !next) {
|
else if (event == EVT_ROTARY_RIGHT && !next) {
|
||||||
first->setFocus(SET_FOCUS_FIRST);
|
if (first)
|
||||||
|
first->setFocus(SET_FOCUS_FIRST);
|
||||||
}
|
}
|
||||||
else if (event == EVT_ROTARY_LEFT && !previous) {
|
else if (event == EVT_ROTARY_LEFT && !previous) {
|
||||||
last->setFocus(SET_FOCUS_FIRST);
|
if (last)
|
||||||
|
last->setFocus(SET_FOCUS_FIRST);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
FormField::onEvent(event);
|
FormField::onEvent(event);
|
||||||
|
|||||||
Reference in New Issue
Block a user