mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #44218 from aaronfranke/grid-inst-err
Fix trying to set grid visibility on an invalid instance
This commit is contained in:
commit
c567a97178
@ -4999,9 +4999,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (grid_enable[i]) {
|
||||
grid_visible[i] = grid_enabled;
|
||||
if (grid_instance[i].is_valid()) {
|
||||
RenderingServer::get_singleton()->instance_set_visible(grid_instance[i], grid_enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
_finish_grid();
|
||||
@ -6160,7 +6157,6 @@ void Node3DEditor::clear() {
|
||||
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]) {
|
||||
RenderingServer::get_singleton()->instance_set_visible(grid_instance[i], true);
|
||||
grid_visible[i] = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user