Fix bug with id 7 when a tabview is present on the page

This commit is contained in:
fvanroie 2022-06-04 14:12:50 +02:00
parent c583e1cbf9
commit 45daee85f4

View File

@ -39,7 +39,7 @@ lv_obj_t* hasp_find_obj_from_parent_id(lv_obj_t* parent, uint8_t objid)
for(uint16_t i = 0; i < tabcount; i++) {
lv_obj_t* tab = lv_tabview_get_tab(child, i);
// LOG_DEBUG(TAG_HASP, "Found tab %i", i);
if(tab->user_data.objid && objid == tab->user_data.objid) return tab; /* tab found, return it */
if(tab->user_data.id && objid == tab->user_data.id) return tab; /* tab found, return it */
/* check grandchildren */
grandchild = hasp_find_obj_from_parent_id(tab, objid);