From 797f2ad8ba880125d4d05f19f4721eda0343611b Mon Sep 17 00:00:00 2001 From: Sebastien Benard Date: Thu, 30 Nov 2023 09:41:05 +0100 Subject: [PATCH] Fixed level render after biome field change --- src/electron.renderer/ui/LevelInstanceForm.hx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/electron.renderer/ui/LevelInstanceForm.hx b/src/electron.renderer/ui/LevelInstanceForm.hx index 410dafd1d..44c49051c 100644 --- a/src/electron.renderer/ui/LevelInstanceForm.hx +++ b/src/electron.renderer/ui/LevelInstanceForm.hx @@ -97,6 +97,16 @@ class LevelInstanceForm { if( isUsingLevel(l) ) updateFieldsForm(); + // Biome field changed + var anyAutoLayerInvalidated = false; + for( ld in project.defs.layers ) + if( ld.biomeFieldUid==fi.defUid ) { + l.getLayerInstance(ld).autoTilesCache = null; + anyAutoLayerInvalidated = true; + } + if( anyAutoLayerInvalidated ) + editor.ge.emit(AutoLayerRenderingChanged); + case _: } }