fix(color): rotary encoder events not always working on some screens (#5714)

Specifically, after having left screens with TableField focused
This commit is contained in:
philmoz
2024-12-19 10:35:52 +10:00
committed by GitHub
parent 73595125dc
commit 0568df1f99
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -320,3 +320,13 @@ void TableField::setAutoEdit()
lv_group_set_editing(g, true);
}
}
void TableField::deleteLater(bool detach, bool trash)
{
if (!deleted())
if (autoedit) {
lv_group_t* g = (lv_group_t*)lv_obj_get_group(lvobj);
lv_group_set_focus_cb(g, nullptr);
lv_group_set_editing(g, false);
}
}
+2
View File
@@ -64,5 +64,7 @@ class TableField : public Window
void onEvent(event_t event) override;
bool onLongPress() override;
void deleteLater(bool detach = true, bool trash = true) override;
static void force_editing(lv_group_t* g) { lv_group_set_editing(g, true); }
};