Enable RichTextLabel context menu if selection is enabled

This commit is contained in:
Danil Alexeev 2023-02-28 16:19:48 +03:00
parent ad9302bafc
commit 06c7940a5a
No known key found for this signature in database
GPG Key ID: 124453E157DA8DC7
8 changed files with 9 additions and 0 deletions

View File

@ -2343,6 +2343,7 @@ EditorHelp::EditorHelp() {
status_bar->add_child(toggle_scripts_button);
class_desc->set_selection_enabled(true);
class_desc->set_context_menu_enabled(true);
class_desc->hide();
}

View File

@ -380,6 +380,7 @@ EditorLog::EditorLog() {
log->set_use_bbcode(true);
log->set_scroll_follow(true);
log->set_selection_enabled(true);
log->set_context_menu_enabled(true);
log->set_focus_mode(FOCUS_CLICK);
log->set_v_size_flags(SIZE_EXPAND_FILL);
log->set_h_size_flags(SIZE_EXPAND_FILL);

View File

@ -8054,6 +8054,7 @@ EditorNode::EditorNode() {
execute_outputs = memnew(RichTextLabel);
execute_outputs->set_selection_enabled(true);
execute_outputs->set_context_menu_enabled(true);
execute_output_dialog = memnew(AcceptDialogAutoReparent);
execute_output_dialog->add_child(execute_outputs);
execute_output_dialog->set_title("");

View File

@ -245,6 +245,7 @@ void EditorAssetLibraryItemDescription::configure(const String &p_title, int p_a
description->add_text("\n" + TTR("Description:") + "\n\n");
description->append_text(p_description);
description->set_selection_enabled(true);
description->set_context_menu_enabled(true);
set_title(p_title);
}

View File

@ -2174,6 +2174,7 @@ ScriptTextEditor::ScriptTextEditor() {
warnings_panel->set_h_size_flags(SIZE_EXPAND_FILL);
warnings_panel->set_meta_underline(true);
warnings_panel->set_selection_enabled(true);
warnings_panel->set_context_menu_enabled(true);
warnings_panel->set_focus_mode(FOCUS_CLICK);
warnings_panel->hide();
@ -2182,6 +2183,7 @@ ScriptTextEditor::ScriptTextEditor() {
errors_panel->set_h_size_flags(SIZE_EXPAND_FILL);
errors_panel->set_meta_underline(true);
errors_panel->set_selection_enabled(true);
errors_panel->set_context_menu_enabled(true);
errors_panel->set_focus_mode(FOCUS_CLICK);
errors_panel->hide();

View File

@ -289,6 +289,7 @@ ShaderFileEditor::ShaderFileEditor() {
error_text = memnew(RichTextLabel);
error_text->set_v_size_flags(SIZE_EXPAND_FILL);
error_text->set_selection_enabled(true);
error_text->set_context_menu_enabled(true);
main_vb->add_child(error_text);
}

View File

@ -1169,6 +1169,7 @@ TextShaderEditor::TextShaderEditor() {
warnings_panel->set_h_size_flags(SIZE_EXPAND_FILL);
warnings_panel->set_meta_underline(true);
warnings_panel->set_selection_enabled(true);
warnings_panel->set_context_menu_enabled(true);
warnings_panel->set_focus_mode(FOCUS_CLICK);
warnings_panel->hide();
warnings_panel->connect("meta_clicked", callable_mp(this, &TextShaderEditor::_warning_clicked));

View File

@ -1504,6 +1504,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
diff->set_v_size_flags(TextEdit::SIZE_EXPAND_FILL);
diff->set_use_bbcode(true);
diff->set_selection_enabled(true);
diff->set_context_menu_enabled(true);
version_control_dock->add_child(diff);
_update_set_up_warning("");