mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:08:10 +00:00
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.
This commit is contained in:
parent
234ae3a2ae
commit
4addad67d1
1 changed files with 3 additions and 0 deletions
|
@ -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({});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue