Prechádzať zdrojové kódy

Fix gridmap error spam at startup

Yuri Roubinsky 5 rokov pred
rodič
commit
51e5bcfc2c
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      modules/gridmap/grid_map_editor_plugin.cpp

+ 3 - 1
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.click = p_begin;
 	selection.current = p_end;
 	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_CLEAR), !selection.active);
 	options->get_popup()->set_item_disabled(options->get_popup()->get_item_index(MENU_OPTION_SELECTION_CUT), !selection.active);
 	options->get_popup()->set_item_disabled(options->get_popup()->get_item_index(MENU_OPTION_SELECTION_CUT), !selection.active);