From 4addad67d1287955805d972ad77ef36c27b48315 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 19 Nov 2022 09:50:35 -0500 Subject: [PATCH] LibGUI: Propagate changing an action's text to its associated buttons All other action state changes are already propagated to the action's buttons. Do the same for text. --- Userland/Libraries/LibGUI/Action.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibGUI/Action.cpp b/Userland/Libraries/LibGUI/Action.cpp index 76198bf8e0..213142718d 100644 --- a/Userland/Libraries/LibGUI/Action.cpp +++ b/Userland/Libraries/LibGUI/Action.cpp @@ -275,6 +275,9 @@ void Action::set_text(String text) if (m_text == text) return; m_text = move(text); + for_each_toolbar_button([&](auto& button) { + button.set_text(m_text); + }); for_each_menu_item([&](auto& menu_item) { menu_item.update_from_action({}); });