From 688b8b9a7b453696a995ba8fdea29d4b5283d6de Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sat, 11 Dec 2021 21:37:09 +0000 Subject: [PATCH] Fix inspector properties not refreshed when changing the geometry type of a Voxel resource --- meshers/blocky/voxel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshers/blocky/voxel.cpp b/meshers/blocky/voxel.cpp index ba92769b..d384dbfc 100644 --- a/meshers/blocky/voxel.cpp +++ b/meshers/blocky/voxel.cpp @@ -114,6 +114,9 @@ void Voxel::set_transparency_index(int i) { } void Voxel::set_geometry_type(GeometryType type) { + if (type == _geometry_type) { + return; + } _geometry_type = type; switch (_geometry_type) { @@ -135,6 +138,9 @@ void Voxel::set_geometry_type(GeometryType type) { ERR_PRINT("Wtf? Unknown geometry type"); break; } +#ifdef TOOLS_ENABLED + property_list_changed_notify(); +#endif } Voxel::GeometryType Voxel::get_geometry_type() const {