Fixes
This commit is contained in:
+3
-1
@@ -37,7 +37,9 @@ void Button::onEvent(event_t event)
|
||||
TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString("Button").c_str(), event);
|
||||
|
||||
if (event == EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
onPress();
|
||||
if (enabled) {
|
||||
onPress();
|
||||
}
|
||||
}
|
||||
else {
|
||||
FormField::onEvent(event);
|
||||
|
||||
@@ -36,6 +36,9 @@ class ModalWindow: public Window
|
||||
|
||||
void deleteLater()
|
||||
{
|
||||
if (deleted)
|
||||
return;
|
||||
|
||||
if (previousFocus) {
|
||||
previousFocus->setFocus(SET_FOCUS_DEFAULT);
|
||||
}
|
||||
|
||||
@@ -69,6 +69,9 @@ void Window::detach()
|
||||
|
||||
void Window::deleteLater(bool detach)
|
||||
{
|
||||
if (deleted)
|
||||
return;
|
||||
|
||||
TRACE_WINDOWS("Delete %p %s", this, getWindowDebugString().c_str());
|
||||
|
||||
if (static_cast<Window *>(focusWindow) == static_cast<Window *>(this)) {
|
||||
@@ -85,6 +88,8 @@ void Window::deleteLater(bool detach)
|
||||
}
|
||||
|
||||
trash.push_back(this);
|
||||
|
||||
deleted = true;
|
||||
}
|
||||
|
||||
void Window::clear()
|
||||
|
||||
+1
@@ -354,6 +354,7 @@ class Window {
|
||||
coord_t scrollPositionY = 0;
|
||||
WindowFlags windowFlags;
|
||||
LcdFlags textFlags;
|
||||
bool deleted = false;
|
||||
|
||||
static Window * focusWindow;
|
||||
static Window * slidingWindow;
|
||||
|
||||
Reference in New Issue
Block a user