Fix regression introduced in 767897d665

In some cases we have to enable the DIRTY flag in the hierarchy.
Reproducible case: right-click a tab with an image, open in a folder,
then right-click the tab again.
This commit is contained in:
David Capello 2018-12-04 12:54:40 -03:00
parent e3dc8fa3a6
commit 4790e3845a

View File

@ -1611,16 +1611,10 @@ void Widget::offsetWidgets(int dx, int dy)
void Widget::setDirtyFlag()
{
Widget* widget = this;
while (widget && !widget->hasFlags(DIRTY)) {
while (widget) {
widget->enableFlags(DIRTY);
widget = widget->parent();
}
#if _DEBUG // Check that all parents has the DIRTY flag
while (widget) {
ASSERT(widget->hasFlags(DIRTY));
widget = widget->parent();
}
#endif
}
} // namespace ui