mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:58:10 +00:00
LibGUI: Ignore GWidget::update() on invisible widgets.
This commit is contained in:
parent
bc3c199bb1
commit
20137e45f4
1 changed files with 3 additions and 0 deletions
|
@ -83,6 +83,7 @@ void GWidget::event(GEvent& event)
|
||||||
|
|
||||||
void GWidget::handle_paint_event(GPaintEvent& event)
|
void GWidget::handle_paint_event(GPaintEvent& event)
|
||||||
{
|
{
|
||||||
|
ASSERT(is_visible());
|
||||||
if (fill_with_background_color()) {
|
if (fill_with_background_color()) {
|
||||||
Painter painter(*this);
|
Painter painter(*this);
|
||||||
painter.fill_rect(event.rect(), background_color());
|
painter.fill_rect(event.rect(), background_color());
|
||||||
|
@ -227,6 +228,8 @@ void GWidget::update()
|
||||||
|
|
||||||
void GWidget::update(const Rect& rect)
|
void GWidget::update(const Rect& rect)
|
||||||
{
|
{
|
||||||
|
if (!is_visible())
|
||||||
|
return;
|
||||||
auto* w = window();
|
auto* w = window();
|
||||||
if (!w)
|
if (!w)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue