瀏覽代碼

Fix odd newline in `EditorLog::add_message()`

(cherry picked from commit a8dce9c3773e42ff7c434aa55ea8695ee944edbd)
Danil Alexeev 4 年之前
父節點
當前提交
3002f57e1b
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      editor/editor_log.cpp

+ 1 - 3
editor/editor_log.cpp

@@ -102,9 +102,6 @@ void EditorLog::copy() {
 }
 }
 
 
 void EditorLog::add_message(const String &p_msg, MessageType p_type) {
 void EditorLog::add_message(const String &p_msg, MessageType p_type) {
-
-	log->add_newline();
-
 	bool restore = p_type != MSG_TYPE_STD;
 	bool restore = p_type != MSG_TYPE_STD;
 	switch (p_type) {
 	switch (p_type) {
 		case MSG_TYPE_STD: {
 		case MSG_TYPE_STD: {
@@ -130,6 +127,7 @@ void EditorLog::add_message(const String &p_msg, MessageType p_type) {
 	}
 	}
 
 
 	log->add_text(p_msg);
 	log->add_text(p_msg);
+	log->add_newline();
 
 
 	if (restore)
 	if (restore)
 		log->pop();
 		log->pop();