mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 23:09:26 -05:00
Improve repaint scope when widgets removed from parent.
Addresses flickering (again!) when switching between options views in receiver app.
This commit is contained in:
parent
bf77abd247
commit
80511ac93f
@ -241,11 +241,8 @@ void View::add_children(const std::vector<Widget*>& children) {
|
||||
void View::remove_child(Widget* const widget) {
|
||||
if( widget ) {
|
||||
children_.erase(std::remove(children_.begin(), children_.end(), widget), children_.end());
|
||||
dirty_screen_rect += widget->screen_rect();
|
||||
dirty_overlapping_children_in_rect(widget->screen_rect());
|
||||
widget->set_parent(nullptr);
|
||||
if( dirty_screen_rect ) {
|
||||
set_dirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user