From 0486614da4d5916ef18fc3975e4e2d281899f507 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Wed, 29 Jun 2022 18:02:40 +1000
Subject: Fix min/max-tile-sz not saving in-tandem where needed

---
 src/components/SettingsModal.vue | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/components/SettingsModal.vue')

diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue
index 58da129..b11c84c 100644
--- a/src/components/SettingsModal.vue
+++ b/src/components/SettingsModal.vue
@@ -135,12 +135,15 @@ export default defineComponent({
 				let maxInput = this.$refs.maxTileSzInput as HTMLInputElement;
 				if (option == 'minTileSz' && Number(minInput.value) > Number(maxInput.value)){
 					this.lytOpts.maxTileSz = this.lytOpts.minTileSz;
+					this.$emit('setting-chg', 'LYT', 'maxTileSz', {save: false});
 				} else if (option == 'maxTileSz' && Number(maxInput.value) < Number(minInput.value)){
 					this.lytOpts.minTileSz = this.lytOpts.maxTileSz;
+					this.$emit('setting-chg', 'LYT', 'minTileSz', {save: false});
 				}
 			}
 			//
-			this.$emit('setting-chg', optionType, option, save);
+			this.$emit('setting-chg', optionType, option,
+				{save, relayout: optionType == 'LYT', reinit: optionType == 'UI' && option == 'useReducedTree'});
 			if (save){
 				// Make saved-indicator appear/animate
 				if (!this.saved){
-- 
cgit v1.2.3

