Fix trying to set grid visibility on an invalid instance
(cherry picked from commit 8c1d94ebae
)
This commit is contained in:
parent
96e009c772
commit
4267f40e88
1 changed files with 0 additions and 4 deletions
|
@ -4975,9 +4975,6 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
if (grid_enable[i]) {
|
if (grid_enable[i]) {
|
||||||
grid_visible[i] = grid_enabled;
|
grid_visible[i] = grid_enabled;
|
||||||
if (grid_instance[i].is_valid()) {
|
|
||||||
VisualServer::get_singleton()->instance_set_visible(grid_instance[i], grid_enabled);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_finish_grid();
|
_finish_grid();
|
||||||
|
@ -6147,7 +6144,6 @@ void SpatialEditor::clear() {
|
||||||
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]) {
|
||||||
VisualServer::get_singleton()->instance_set_visible(grid_instance[i], true);
|
|
||||||
grid_visible[i] = true;
|
grid_visible[i] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue