Mercurial > hg > orthanc-stone
changeset 232:7d3b2c4f9ba1 am
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 ...)
author | am@osimis.io |
---|---|
date | Fri, 15 Jun 2018 11:23:04 +0200 |
parents | 5027cb2feb51 |
children | 68856534f005 |
files | Framework/Widgets/LayoutWidget.cpp |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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(); }