mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 03:32:48 +00:00
Check that we're calling the Widget::invalidate() from the ui thread
This commit is contained in:
parent
43a603cea9
commit
4487c3d35f
@ -1103,6 +1103,8 @@ void Widget::setTransparent(bool transparent)
|
||||
|
||||
void Widget::invalidate()
|
||||
{
|
||||
assert_ui_thread();
|
||||
|
||||
// TODO we should use invalidateRect(bounds()) here.
|
||||
|
||||
if (isVisible()) {
|
||||
@ -1118,12 +1120,15 @@ void Widget::invalidate()
|
||||
|
||||
void Widget::invalidateRect(const gfx::Rect& rect)
|
||||
{
|
||||
assert_ui_thread();
|
||||
|
||||
if (isVisible())
|
||||
invalidateRegion(Region(rect));
|
||||
}
|
||||
|
||||
void Widget::invalidateRegion(const Region& region)
|
||||
{
|
||||
assert_ui_thread();
|
||||
onInvalidateRegion(region);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user