From 1d81d2e072430ac8366eef214130bc0afdc922ef Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Tue, 5 Jul 2022 11:33:25 -0400 Subject: [PATCH] LibGUI: Don't ignore invisible widgets during layout changes As they may be setting themselves visible again in the process. Fixes inability to toggle widgets on and off in some apps. --- Userland/Libraries/LibGUI/Widget.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Userland/Libraries/LibGUI/Widget.cpp b/Userland/Libraries/LibGUI/Widget.cpp index fc9c41c051..c3fd5e39d7 100644 --- a/Userland/Libraries/LibGUI/Widget.cpp +++ b/Userland/Libraries/LibGUI/Widget.cpp @@ -201,12 +201,10 @@ Widget::~Widget() = default; void Widget::layout_relevant_change_occured() { - if (is_visible()) { - if (auto* parent = parent_widget()) - parent->layout_relevant_change_occured(); - else if (window()) - window()->schedule_relayout(); - } + if (auto* parent = parent_widget()) + parent->layout_relevant_change_occured(); + else if (window()) + window()->schedule_relayout(); } void Widget::child_event(Core::ChildEvent& event)