diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index e969f9ab30..4814b9ae3b 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -5407,6 +5407,7 @@ CanvasItemEditor::CanvasItemEditor() { singleton = this; set_process_shortcut_input(true); + clear(); // Make sure values are initialized. // Update the menus' checkboxes. callable_mp(this, &CanvasItemEditor::set_state).bind(get_state()).call_deferred(); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 27c97ff9f4..e443548550 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -7866,7 +7866,10 @@ void Node3DEditor::clear() { viewports[i]->reset(); } - RenderingServer::get_singleton()->instance_set_visible(origin_instance, true); + if (origin_instance.is_valid()) { + RenderingServer::get_singleton()->instance_set_visible(origin_instance, true); + } + view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN), true); for (int i = 0; i < 3; ++i) { if (grid_enable[i]) { @@ -8654,6 +8657,7 @@ void fragment() { _load_default_preview_settings(); _preview_settings_changed(); } + clear(); // Make sure values are initialized. } Node3DEditor::~Node3DEditor() { memdelete(preview_node); |