diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-02-07 02:52:05 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-02-21 11:12:03 +0100 |
commit | cbc450c0e53dbfc31a30f5ebf37c51cee77cde5c (patch) | |
tree | fa1e7a1e80ec7cbe0546a752732bf34b66299100 /editor/plugins/canvas_item_editor_plugin.cpp | |
parent | 8b058d4b9a63799e29d3e9ef551bbdf8144f8f8b (diff) |
Huge Debugger/EditorDebugger refactor.
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index b91b346089..dfcaf5cdd2 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -34,12 +34,12 @@ #include "core/os/keyboard.h" #include "core/print_string.h" #include "core/project_settings.h" +#include "editor/debugger/editor_debugger_node.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/plugins/animation_player_editor_plugin.h" #include "editor/plugins/script_editor_plugin.h" -#include "editor/script_editor_debugger.h" #include "scene/2d/light_2d.h" #include "scene/2d/particles_2d.h" #include "scene/2d/polygon_2d.h" @@ -3990,7 +3990,7 @@ void CanvasItemEditor::_notification(int p_what) { if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { if (!is_visible() && override_camera_button->is_pressed()) { - ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton(); debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE); override_camera_button->set_pressed(false); @@ -4345,7 +4345,7 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) { viewport->update(); } void CanvasItemEditor::_button_override_camera(bool p_pressed) { - ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton(); if (p_pressed) { debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_2D); @@ -5960,9 +5960,9 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String & if (parent) { String new_name = parent->validate_child_name(child); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", editor->get_edited_scene()->get_path_to(parent), child->get_class(), new_name); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_create_node", editor->get_edited_scene()->get_path_to(parent), child->get_class(), new_name); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); } // handle with different property for texture @@ -6030,9 +6030,9 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene); String new_name = parent->validate_child_name(instanced_scene); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); CanvasItem *parent_ci = Object::cast_to<CanvasItem>(parent); if (parent_ci) { |