# HG changeset patch # User am@osimis.io # Date 1529054584 -7200 # Node ID 7d3b2c4f9ba1276216f42a34aebf20bf24549f7b # Parent 5027cb2feb51cd6b06d42f551bc11cb1eb6c3f02 don't cache hasUpdate_ since its not updated when we update the underlying hierarchy (i.e: when the child of a layout is a layout without child when it is added but childs are added later ...) diff -r 5027cb2feb51 -r 7d3b2c4f9ba1 Framework/Widgets/LayoutWidget.cpp --- a/Framework/Widgets/LayoutWidget.cpp Thu Jun 14 18:49:19 2018 +0200 +++ b/Framework/Widgets/LayoutWidget.cpp Fri Jun 15 11:23:04 2018 +0200 @@ -82,12 +82,10 @@ int top_; unsigned int width_; unsigned int height_; - bool hasUpdate_; public: ChildWidget(IWidget* widget) : - widget_(widget), - hasUpdate_(widget->HasUpdateContent()) + widget_(widget) { assert(widget != NULL); SetEmpty(); @@ -95,7 +93,7 @@ void UpdateContent() { - if (hasUpdate_) + if (widget_->HasUpdateContent()) { widget_->UpdateContent(); }