mirror of
https://github.com/godotengine/godot.git
synced 2025-01-10 20:20:55 +00:00
Added automatic clear output on Play in Godot Settings
This commit is contained in:
parent
f46e340ab5
commit
4ad590b92f
@ -110,6 +110,10 @@ void EditorLog::_clear_request() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EditorLog::clear() {
|
||||||
|
_clear_request();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditorLog::add_message(const String& p_msg,bool p_error) {
|
void EditorLog::add_message(const String& p_msg,bool p_error) {
|
||||||
|
|
||||||
@ -175,6 +179,7 @@ void EditorLog::_bind_methods() {
|
|||||||
ObjectTypeDB::bind_method(_MD("_close_request"),&EditorLog::_close_request );
|
ObjectTypeDB::bind_method(_MD("_close_request"),&EditorLog::_close_request );
|
||||||
ObjectTypeDB::bind_method(_MD("_flip_request"),&EditorLog::_flip_request );
|
ObjectTypeDB::bind_method(_MD("_flip_request"),&EditorLog::_flip_request );
|
||||||
ObjectTypeDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
|
ObjectTypeDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
|
||||||
|
|
||||||
//ObjectTypeDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
|
//ObjectTypeDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
|
||||||
ADD_SIGNAL( MethodInfo("close_request"));
|
ADD_SIGNAL( MethodInfo("close_request"));
|
||||||
ADD_SIGNAL( MethodInfo("show_request"));
|
ADD_SIGNAL( MethodInfo("show_request"));
|
||||||
@ -255,8 +260,8 @@ void EditorLog::deinit() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EditorLog::~EditorLog() {
|
EditorLog::~EditorLog() {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "scene/gui/label.h"
|
#include "scene/gui/label.h"
|
||||||
#include "scene/gui/rich_text_label.h"
|
#include "scene/gui/rich_text_label.h"
|
||||||
#include "scene/gui/texture_button.h"
|
#include "scene/gui/texture_button.h"
|
||||||
|
#include "scene/gui/check_button.h"
|
||||||
//#include "scene/gui/empty_control.h"
|
//#include "scene/gui/empty_control.h"
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
#include "scene/gui/panel_container.h"
|
#include "scene/gui/panel_container.h"
|
||||||
@ -59,11 +60,11 @@ class EditorLog : public PanelContainer {
|
|||||||
|
|
||||||
Thread::ID current;
|
Thread::ID current;
|
||||||
|
|
||||||
|
|
||||||
// void _dragged(const Point2& p_ofs);
|
// void _dragged(const Point2& p_ofs);
|
||||||
void _close_request();
|
void _close_request();
|
||||||
void _flip_request();
|
void _flip_request();
|
||||||
void _clear_request();
|
void _clear_request();
|
||||||
|
void _clearonplay_request();
|
||||||
static void _undo_redo_cbk(void *p_self,const String& p_name);
|
static void _undo_redo_cbk(void *p_self,const String& p_name);
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -75,6 +76,7 @@ public:
|
|||||||
void deinit();
|
void deinit();
|
||||||
|
|
||||||
ToolButton *get_button();
|
ToolButton *get_button();
|
||||||
|
void clear();
|
||||||
EditorLog();
|
EditorLog();
|
||||||
~EditorLog();
|
~EditorLog();
|
||||||
};
|
};
|
||||||
|
@ -1564,7 +1564,6 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
|
|||||||
Node *scene = editor_data.get_edited_scene_root();
|
Node *scene = editor_data.get_edited_scene_root();
|
||||||
|
|
||||||
if (!scene) {
|
if (!scene) {
|
||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text("I see..");
|
accept->get_ok()->set_text("I see..");
|
||||||
@ -1645,6 +1644,11 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
|
|||||||
editor_data.save_editor_external_data();
|
editor_data.save_editor_external_data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bool(EDITOR_DEF("run/always_clear_output_on_play", true))) {
|
||||||
|
print_line("Setting option was set to ON -> clearing");
|
||||||
|
log->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
List<String> breakpoints;
|
List<String> breakpoints;
|
||||||
editor_data.get_editor_breakpoints(&breakpoints);
|
editor_data.get_editor_breakpoints(&breakpoints);
|
||||||
|
Loading…
Reference in New Issue
Block a user