mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-01 01:13:40 +00:00
Avoid clipping hidden windows (fix #4546)
This commit is contained in:
parent
9eadd740b8
commit
f76bbcff67
@ -2051,10 +2051,12 @@ void Manager::onInvalidateRegion(const gfx::Region& region)
|
||||
break; // Work done
|
||||
}
|
||||
|
||||
// Clip this window area for the next window.
|
||||
gfx::Region reg2;
|
||||
window->getRegion(reg2);
|
||||
reg1.createSubtraction(reg1, reg2);
|
||||
// Clip this window area for the next window, only if not hidden.
|
||||
if (!window->hasFlags(HIDDEN)) {
|
||||
gfx::Region reg2;
|
||||
window->getRegion(reg2);
|
||||
reg1.createSubtraction(reg1, reg2);
|
||||
}
|
||||
}
|
||||
|
||||
// Invalidate areas outside windows (only when there are not a
|
||||
|
@ -232,6 +232,11 @@ void Widget::setVisible(bool state)
|
||||
man->freeWidget(this); // Free from manager
|
||||
enableFlags(HIDDEN);
|
||||
|
||||
// As this widget was hidden we need to invalidate the area it was
|
||||
// occupying
|
||||
if (auto man = manager())
|
||||
man->invalidateRect(bounds());
|
||||
|
||||
onVisible(false);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user