diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-02 14:15:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-02 14:15:25 +0100 |
commit | 5895cd4c4fe8cf04a7109d52388be46f619b56f1 (patch) | |
tree | f9531cd1b9dd5afab64537a1e5e43d00dce14e56 /scene/2d/polygon_2d.cpp | |
parent | 3fc5ae02aa6f50b153a1b5222046915054b88284 (diff) | |
parent | 70304f8633c8cf8faa530dadf648ecfcabf80655 (diff) |
Merge pull request #36202 from YeldhamDev/sprite_region_hide
Hide extra options from various nodes if they're not enabled
Diffstat (limited to 'scene/2d/polygon_2d.cpp')
-rw-r--r-- | scene/2d/polygon_2d.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index ecc05fb931..a60a32f1d2 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -88,6 +88,12 @@ bool Polygon2D::_edit_is_selected_on_click(const Point2 &p_point, double p_toler } return Geometry2D::is_point_in_polygon(p_point - get_offset(), polygon2d); } + +void Polygon2D::_validate_property(PropertyInfo &property) const { + if (!invert && property.name == "invert_border") { + property.usage = PROPERTY_USAGE_NOEDITOR; + } +} #endif void Polygon2D::_skeleton_bone_setup_changed() { @@ -455,6 +461,7 @@ Size2 Polygon2D::get_texture_scale() const { void Polygon2D::set_invert(bool p_invert) { invert = p_invert; update(); + notify_property_list_changed(); } bool Polygon2D::get_invert() const { |