BigW Consortium Gitlab

Commit 6be0089c by Gabor Kiss-Vamosi

lv_group_del: remove the objects from the groups too

parent 80cb93f8
...@@ -58,6 +58,18 @@ lv_group_t * lv_group_create(void) ...@@ -58,6 +58,18 @@ lv_group_t * lv_group_create(void)
*/ */
void lv_group_del(lv_group_t * group) void lv_group_del(lv_group_t * group)
{ {
/*Defocus the the currently focussed object*/
if(group->obj_focus != NULL) {
(*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
lv_obj_invalidate(*group->obj_focus);
}
/*Remove the objects from the group*/
lv_obj_t ** obj;
LL_READ(group->obj_ll, obj) {
(*obj)->group_p = NULL;
}
lv_ll_clear(&(group->obj_ll)); lv_ll_clear(&(group->obj_ll));
lv_mem_free(group); lv_mem_free(group);
} }
...@@ -116,7 +128,6 @@ void lv_group_focus_obj(lv_obj_t * obj) ...@@ -116,7 +128,6 @@ void lv_group_focus_obj(lv_obj_t * obj)
if(g->frozen != 0) return; if(g->frozen != 0) return;
lv_obj_t ** i; lv_obj_t ** i;
LL_READ(g->obj_ll, i) { LL_READ(g->obj_ll, i) {
if(*i == obj) { if(*i == obj) {
if(g->obj_focus != NULL) { if(g->obj_focus != NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment