fix(color): Clear edit mode when page closes (#4152)

This commit is contained in:
philmoz
2023-10-03 11:11:18 +10:00
committed by GitHub
parent aabf67d453
commit 5391d68364
2 changed files with 9 additions and 1 deletions
+7
View File
@@ -72,6 +72,13 @@ void FormField::onCancel()
}
}
void FormField::deleteLater(bool detach, bool trash)
{
if (isEditMode())
setEditMode(false);
Window::deleteLater(detach, trash);
}
FormWindow::Line::Line(Window* parent, lv_obj_t* obj, FlexGridLayout* layout) :
Window(parent, obj), layout(layout)
{
+2 -1
View File
@@ -45,7 +45,8 @@ class FormField : public Window
void onClicked() override;
void onCancel() override;
void deleteLater(bool detach = true, bool trash = true) override;
protected:
bool editMode = false;
bool enabled = true;