Closed
Description
Perform all steps below and tick them with [x]
- Check the related part of the DocumentationUpdate lvgl to the latest versionReproduce the issue in a Simulator
Describe the bug
indev->group is kept when group is deleted.
When I delete a group (group_del()), that group could still be assigned to an indev (lv_indev_set_group()).
As the objects in the group are 'told' the group is deleted, I would assume the indev is as well. But it is not. I had to make a workaround for this as I'm deleting groups, setting lv_indev_set_group(indev, nullptr) to remove it.
Not sure if this is intended behaviour but since these kind of things seem to be taken care of in the rest of LVGL I would think this is a bug.
To Reproduce
v_group_t* g = lv_group_create();
lv_indev_set_group(g);
lv_group_del(g);
have some fun with your indev->group
Expected behavior
I think group_del shoudl iterate the indev's to see if anyone has its group set to the one going to be deleted.
Screenshots or video
Metadata
Metadata
Assignees
Labels
No labels
Activity
knifter commentedon Jan 5, 2022
@kisvegabor: I can make a pull request if you like, have to fork anyway as I have two other functions (group_insert_next(), lv_ll_ins_next()) I'd like to add & create a PR for.
kisvegabor commentedon Jan 5, 2022
It's really a bug. A PR would welcome, thank you! 🙂
lv_group_del: remove group from indev (lvgl#2963)
knifter commentedon Jan 5, 2022
The PR fixes the problem for me
knifter commentedon Jan 6, 2022
PR was merged into master
embeddedt commentedon Jan 6, 2022
Not yet; I approved it but didn't merge it quite yet as I wanted @kisvegabor to confirm.
fix(group): in lv_group_del() remove group from indev (#2963) (#2964)
kisvegabor commentedon Jan 6, 2022
Merged now, thank you! 🙂