mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibGUI/TextEditor: Set cut and copy actions to disabled on init
We can presume that there is nothing to cut or copy on init since nothing is selected yet.
This commit is contained in:
parent
9f117a79f6
commit
2264de9921
Notes:
sideshowbarker
2024-07-18 11:03:27 +09:00
Author: https://github.com/metmo
Commit: 2264de9921
Pull-request: https://github.com/SerenityOS/serenity/pull/8116
Issue: https://github.com/SerenityOS/serenity/issues/7462
1 changed files with 2 additions and 0 deletions
|
@ -80,6 +80,8 @@ void TextEditor::create_actions()
|
|||
m_redo_action->set_enabled(false);
|
||||
m_cut_action = CommonActions::make_cut_action([&](auto&) { cut(); }, this);
|
||||
m_copy_action = CommonActions::make_copy_action([&](auto&) { copy(); }, this);
|
||||
m_cut_action->set_enabled(false);
|
||||
m_copy_action->set_enabled(false);
|
||||
m_paste_action = CommonActions::make_paste_action([&](auto&) { paste(); }, this);
|
||||
m_delete_action = CommonActions::make_delete_action([&](auto&) { do_delete(); }, this);
|
||||
if (is_multi_line()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue