diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2019-10-22 18:13:37 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2019-10-22 18:21:42 +0300 |
commit | 51e5bcfc2cd3d3414c58468971d8268841e5f197 (patch) | |
tree | 7f147def3f9bd0a89798216331711645f5985ed8 /modules/gridmap/grid_map_editor_plugin.cpp | |
parent | 2906cef290c8af61f84e26c889963d355f9e9834 (diff) |
Fix gridmap error spam at startup
Diffstat (limited to 'modules/gridmap/grid_map_editor_plugin.cpp')
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 86a8df652c..7b1d90d7f6 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -353,7 +353,9 @@ void GridMapEditor::_set_selection(bool p_active, const Vector3 &p_begin, const selection.click = p_begin; selection.current = p_end; - _update_selection_transform(); + if (is_visible_in_tree()) { + _update_selection_transform(); + } options->get_popup()->set_item_disabled(options->get_popup()->get_item_index(MENU_OPTION_SELECTION_CLEAR), !selection.active); options->get_popup()->set_item_disabled(options->get_popup()->get_item_index(MENU_OPTION_SELECTION_CUT), !selection.active); |