From fb6eb21afc0a98b2b1439268abb0facd53222a43 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Mon, 14 Sep 2020 21:14:27 +0300 Subject: Improvement for the Copy button in the Output Log Now if no text is selected, pressing the Copy button copies the entire text. --- editor/editor_log.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 9595eb8a72..6fbafc7ff3 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -79,7 +79,15 @@ void EditorLog::_clear_request() { } void EditorLog::_copy_request() { - log->selection_copy(); + String text = log->get_selected_text(); + + if (text == "") { + text = log->get_text(); + } + + if (text != "") { + DisplayServer::get_singleton()->clipboard_set(text); + } } void EditorLog::clear() { -- cgit v1.2.3