Skip to content

Commit

Permalink
Fixed level render after biome field change
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Nov 30, 2023
1 parent 1c64176 commit 797f2ad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/electron.renderer/ui/LevelInstanceForm.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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 _:
}
}
Expand Down

0 comments on commit 797f2ad

Please sign in to comment.