diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-02-14 16:40:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 16:40:40 +0100 |
commit | f810f76890f23843f3895262fe2f88a7d5d3c3f3 (patch) | |
tree | cc47e48e0e378357dc4d82822a0d8c415990df1e /editor/plugins/path_2d_editor_plugin.cpp | |
parent | cd6301ae255f7d4fc6f0c885ea1531b4574512e9 (diff) | |
parent | 05b56f316ddc94c2bb55b62477ec3914fe81a220 (diff) |
Merge pull request #57306 from trollodel/remove_editornode_param
Diffstat (limited to 'editor/plugins/path_2d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/path_2d_editor_plugin.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index 3d8543e1bd..9e666ef70a 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -516,10 +516,9 @@ void Path2DEditor::_handle_option_pressed(int p_option) { } } -Path2DEditor::Path2DEditor(EditorNode *p_editor) { +Path2DEditor::Path2DEditor() { canvas_item_editor = nullptr; - editor = p_editor; - undo_redo = editor->get_undo_redo(); + undo_redo = EditorNode::get_singleton()->get_undo_redo(); mirror_handle_angle = true; mirror_handle_length = true; on_edge = false; @@ -610,9 +609,8 @@ void Path2DEditorPlugin::make_visible(bool p_visible) { } } -Path2DEditorPlugin::Path2DEditorPlugin(EditorNode *p_node) { - editor = p_node; - path2d_editor = memnew(Path2DEditor(p_node)); +Path2DEditorPlugin::Path2DEditorPlugin() { + path2d_editor = memnew(Path2DEditor); CanvasItemEditor::get_singleton()->add_control_to_menu_panel(path2d_editor); path2d_editor->hide(); } |