diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-10-22 20:38:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-22 20:38:14 +0200 |
commit | 4952e19ad086764d87d1f6b97870d617102390e5 (patch) | |
tree | 4293e6e105fb5c0387c825fd2963318e589a2b9c /modules/gridmap | |
parent | a1c890a9e5b135c2c6ff2adc119c677943e6ba69 (diff) | |
parent | 51e5bcfc2cd3d3414c58468971d8268841e5f197 (diff) |
Merge pull request #32991 from Chaosus/fix_bug2
Fix gridmap error spam at startup
Diffstat (limited to 'modules/gridmap')
-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 08c8b5ec71..804c57fc6e 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -350,7 +350,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); |