summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GToolBar.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-25 21:42:37 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-25 21:46:39 +0200
commite8e8741c886506beb31ec2e10ab04bcedbcbdb4d (patch)
treedacd7a8950f2977fd8d8c62a411061c53732500b /Libraries/LibGUI/GToolBar.cpp
parentded005500d87d82d0773e3682e47f190dfa98900 (diff)
downloadserenity-e8e8741c886506beb31ec2e10ab04bcedbcbdb4d.zip
LibGUI+TextEditor: Make GButton activate its action if present
Previously even if you assigned a GAction to a GButton, you still had to activate() the action manually by hooking the GButton::on_click callback.
Diffstat (limited to 'Libraries/LibGUI/GToolBar.cpp')
-rw-r--r--Libraries/LibGUI/GToolBar.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/Libraries/LibGUI/GToolBar.cpp b/Libraries/LibGUI/GToolBar.cpp
index de1eedbf89..93bb8b2f0c 100644
--- a/Libraries/LibGUI/GToolBar.cpp
+++ b/Libraries/LibGUI/GToolBar.cpp
@@ -31,9 +31,6 @@ void GToolBar::add_action(GAction& action)
button->set_icon(item->action->icon());
else
button->set_text(item->action->text());
- button->on_click = [&action](const GButton&) {
- action.activate();
- };
button->set_button_style(ButtonStyle::CoolBar);
button->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);