Remove extra separator when TextEdit is read only and unselectable

This commit is contained in:
Haoyu Qiu 2022-03-04 16:22:39 +08:00
parent d0c3094da8
commit 933211cb0c

View file

@ -5664,8 +5664,10 @@ void TextEdit::_generate_context_menu() {
if (editable) {
menu->add_item(RTR("Paste"), MENU_PASTE, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_paste") : Key::NONE);
}
menu->add_separator();
if (is_selecting_enabled()) {
if (selecting_enabled || editable) {
menu->add_separator();
}
if (selecting_enabled) {
menu->add_item(RTR("Select All"), MENU_SELECT_ALL, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_text_select_all") : Key::NONE);
}
if (editable) {