瀏覽代碼

creating LightOccluder2D polygon makes exclamation mark in scene tree disappear

fixes #21225

This commit fixes an UI bug which leads to a persistent warning in scene tree. Before
this fix the only way to get rid of the warning was to reload the complete scene.

The inspector issue mentioned in #21225 that polygon updates aren't reflected seems to be
fixed in v4.3 and therefore not part of this commit.
Jannik Seemann 10 月之前
父節點
當前提交
a12cdc202d
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/2d/light_occluder_2d.cpp

+ 1 - 0
scene/2d/light_occluder_2d.cpp

@@ -90,6 +90,7 @@ void OccluderPolygon2D::set_polygon(const Vector<Vector2> &p_polygon) {
 	rect_cache_dirty = true;
 	rect_cache_dirty = true;
 	RS::get_singleton()->canvas_occluder_polygon_set_shape(occ_polygon, p_polygon, closed);
 	RS::get_singleton()->canvas_occluder_polygon_set_shape(occ_polygon, p_polygon, closed);
 	emit_changed();
 	emit_changed();
+	update_configuration_warning();
 }
 }
 
 
 Vector<Vector2> OccluderPolygon2D::get_polygon() const {
 Vector<Vector2> OccluderPolygon2D::get_polygon() const {