Skip to content

Commit

Permalink
Merge pull request #75799 from KoBeWi/sector_clear
Browse files Browse the repository at this point in the history
Initialize editor values on first launch
  • Loading branch information
YuriSizov authored Apr 10, 2023
2 parents e684d12 + b0eadcf commit 533ec86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 5 additions & 1 deletion editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down Expand Up @@ -8654,6 +8657,7 @@ void fragment() {
_load_default_preview_settings();
_preview_settings_changed();
}
clear(); // Make sure values are initialized.
}
Node3DEditor::~Node3DEditor() {
memdelete(preview_node);
Expand Down

0 comments on commit 533ec86

Please sign in to comment.