diff --git a/index.html b/index.html
index 45eac37c..3ebfce42 100644
--- a/index.html
+++ b/index.html
@@ -7969,7 +7969,7 @@
-
+
diff --git a/modules/ui/heightmap-editor.js b/modules/ui/heightmap-editor.js
index bd41cefe..44be3fa0 100644
--- a/modules/ui/heightmap-editor.js
+++ b/modules/ui/heightmap-editor.js
@@ -192,11 +192,14 @@ function editHeightmap(options) {
document
.getElementById("mapLayers")
.querySelectorAll("li")
- .forEach(function (e) {
- if (editHeightmap.layers.includes(e.id) && !layerIsOn(e.id)) e.click();
- // turn on
- else if (!editHeightmap.layers.includes(e.id) && layerIsOn(e.id)) e.click(); // turn off
+ .forEach(e => {
+ const wasOn = editHeightmap.layers.includes(e.id);
+ if ((wasOn && !layerIsOn(e.id)) || (!wasOn && layerIsOn(e.id))) e.click();
});
+ if (!layerIsOn("toggleBorders")) borders.selectAll("path").remove();
+ if (!layerIsOn("toggleStates")) regions.selectAll("path").remove();
+ if (!layerIsOn("toggleRivers")) rivers.selectAll("*").remove();
+
getCurrentPreset();
}
diff --git a/versioning.js b/versioning.js
index e3faa023..bdbd43cb 100644
--- a/versioning.js
+++ b/versioning.js
@@ -1,7 +1,7 @@
"use strict";
// version and caching control
-const version = "1.90.03"; // generator version, update each time
+const version = "1.90.04"; // generator version, update each time
{
document.title += " v" + version;