summaryrefslogtreecommitdiffstats
path: root/editor/plugins/collision_shape_2d_editor_plugin.cpp
diff options
context:
space:
mode:
authortrollodel <33117082+trollodel@users.noreply.github.com>2022-01-27 10:36:51 +0100
committertrollodel <33117082+trollodel@users.noreply.github.com>2022-02-14 14:16:24 +0100
commit05b56f316ddc94c2bb55b62477ec3914fe81a220 (patch)
tree928404930fc4f99dfb45d64a6b510e66e2bcc357 /editor/plugins/collision_shape_2d_editor_plugin.cpp
parentf5a27ee4fe45925cebfda11ea7d53ca8f39e0a13 (diff)
downloadredot-engine-05b56f316ddc94c2bb55b62477ec3914fe81a220.tar.gz
Remove most EditorNode constructor parameters and fields
Diffstat (limited to 'editor/plugins/collision_shape_2d_editor_plugin.cpp')
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 311acb8629..af20064a8d 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -583,12 +583,11 @@ void CollisionShape2DEditor::_bind_methods() {
ClassDB::bind_method("_get_current_shape_type", &CollisionShape2DEditor::_get_current_shape_type);
}
-CollisionShape2DEditor::CollisionShape2DEditor(EditorNode *p_editor) {
+CollisionShape2DEditor::CollisionShape2DEditor() {
node = nullptr;
canvas_item_editor = nullptr;
- editor = p_editor;
- undo_redo = p_editor->get_undo_redo();
+ undo_redo = EditorNode::get_singleton()->get_undo_redo();
edit_handle = -1;
pressed = false;
@@ -610,11 +609,9 @@ void CollisionShape2DEditorPlugin::make_visible(bool visible) {
}
}
-CollisionShape2DEditorPlugin::CollisionShape2DEditorPlugin(EditorNode *p_editor) {
- editor = p_editor;
-
- collision_shape_2d_editor = memnew(CollisionShape2DEditor(p_editor));
- p_editor->get_gui_base()->add_child(collision_shape_2d_editor);
+CollisionShape2DEditorPlugin::CollisionShape2DEditorPlugin() {
+ collision_shape_2d_editor = memnew(CollisionShape2DEditor);
+ EditorNode::get_singleton()->get_gui_base()->add_child(collision_shape_2d_editor);
}
CollisionShape2DEditorPlugin::~CollisionShape2DEditorPlugin() {