From 80511ac93f99b449fbb099f04fa73c3e7a40c6bb Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 5 Feb 2016 10:44:09 -0800 Subject: [PATCH] Improve repaint scope when widgets removed from parent. Addresses flickering (again!) when switching between options views in receiver app. --- firmware/common/ui_widget.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/firmware/common/ui_widget.cpp b/firmware/common/ui_widget.cpp index bc188360..0ee1ac08 100644 --- a/firmware/common/ui_widget.cpp +++ b/firmware/common/ui_widget.cpp @@ -241,11 +241,8 @@ void View::add_children(const std::vector& 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(); - } } }