Initialize editor values on first launch
(cherry picked from commit b0eadcfbce
)
This commit is contained in:
parent
967ad04928
commit
177be9bd37
|
@ -5407,6 +5407,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||||
singleton = this;
|
singleton = this;
|
||||||
|
|
||||||
set_process_shortcut_input(true);
|
set_process_shortcut_input(true);
|
||||||
|
clear(); // Make sure values are initialized.
|
||||||
|
|
||||||
// Update the menus' checkboxes.
|
// Update the menus' checkboxes.
|
||||||
callable_mp(this, &CanvasItemEditor::set_state).bind(get_state()).call_deferred();
|
callable_mp(this, &CanvasItemEditor::set_state).bind(get_state()).call_deferred();
|
||||||
|
|
|
@ -7866,7 +7866,10 @@ void Node3DEditor::clear() {
|
||||||
viewports[i]->reset();
|
viewports[i]->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (origin_instance.is_valid()) {
|
||||||
RenderingServer::get_singleton()->instance_set_visible(origin_instance, true);
|
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);
|
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) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
if (grid_enable[i]) {
|
if (grid_enable[i]) {
|
||||||
|
@ -8654,6 +8657,7 @@ void fragment() {
|
||||||
_load_default_preview_settings();
|
_load_default_preview_settings();
|
||||||
_preview_settings_changed();
|
_preview_settings_changed();
|
||||||
}
|
}
|
||||||
|
clear(); // Make sure values are initialized.
|
||||||
}
|
}
|
||||||
Node3DEditor::~Node3DEditor() {
|
Node3DEditor::~Node3DEditor() {
|
||||||
memdelete(preview_node);
|
memdelete(preview_node);
|
||||||
|
|
Loading…
Reference in New Issue