summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2020-09-14 21:14:27 +0300
committerDanil Alexeev <danil@alexeev.xyz>2020-09-14 21:57:54 +0300
commitfb6eb21afc0a98b2b1439268abb0facd53222a43 (patch)
treefb7b14454b791413e10935019982c044b4f4aee4 /editor
parentc5f7a581f7247f599b07b0346062db39e52c7d5a (diff)
Improvement for the Copy button in the Output Log
Now if no text is selected, pressing the Copy button copies the entire text.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_log.cpp10
1 files changed, 9 insertions, 1 deletions
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() {