mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
Minor change in Widget::invalidate*() funcs to use onInvalidateRegion()
This commit is contained in:
parent
4790e3845a
commit
0a179acc90
@ -1096,32 +1096,22 @@ void Widget::setTransparent(bool transparent)
|
|||||||
void Widget::invalidate()
|
void Widget::invalidate()
|
||||||
{
|
{
|
||||||
assert_ui_thread();
|
assert_ui_thread();
|
||||||
|
if (!hasFlags(HIDDEN)) // Quick filter for hidden widgets
|
||||||
// TODO we should use invalidateRect(bounds()) here.
|
onInvalidateRegion(Region(bounds()));
|
||||||
|
|
||||||
if (isVisible()) {
|
|
||||||
m_updateRegion.clear();
|
|
||||||
getDrawableRegion(m_updateRegion, kCutTopWindows);
|
|
||||||
|
|
||||||
setDirtyFlag();
|
|
||||||
|
|
||||||
for (auto child : m_children)
|
|
||||||
child->invalidate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::invalidateRect(const gfx::Rect& rect)
|
void Widget::invalidateRect(const gfx::Rect& rect)
|
||||||
{
|
{
|
||||||
assert_ui_thread();
|
assert_ui_thread();
|
||||||
|
if (!hasFlags(HIDDEN)) // Quick filter for hidden widgets
|
||||||
if (isVisible())
|
onInvalidateRegion(Region(rect));
|
||||||
invalidateRegion(Region(rect));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::invalidateRegion(const Region& region)
|
void Widget::invalidateRegion(const Region& region)
|
||||||
{
|
{
|
||||||
assert_ui_thread();
|
assert_ui_thread();
|
||||||
onInvalidateRegion(region);
|
if (!hasFlags(HIDDEN)) // Quick filter for hidden widgets
|
||||||
|
onInvalidateRegion(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
class DeleteGraphicsAndSurface {
|
class DeleteGraphicsAndSurface {
|
||||||
|
Loading…
Reference in New Issue
Block a user