From db5b4f3069fbe30f6daabffeddf2868d5e8c5240 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Fri, 24 Jun 2022 13:37:06 +1000
Subject: Fix search-bar mode-change button not saving setting

Also fix jump-to-search-result not flashing node in some cases.
---
 src/components/SettingsModal.vue | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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

diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue
index b4fa251..1426a36 100644
--- a/src/components/SettingsModal.vue
+++ b/src/components/SettingsModal.vue
@@ -19,7 +19,8 @@ export default defineComponent({
 	methods: {
 		onCloseClick(evt: Event){
 			if (evt.target == this.$el || (this.$refs.closeIcon as typeof CloseIcon).$el.contains(evt.target)){
-				this.$emit('close', this.changedLytOpts, this.changedUiOpts);
+				this.$emit('settings-chg', this.changedLytOpts, this.changedUiOpts);
+				this.$emit('close');
 			}
 		},
 		onLytOptChg(opt: string){
@@ -52,7 +53,7 @@ export default defineComponent({
 		},
 	},
 	components: {CloseIcon, RButton, },
-	emits: ['close', 'layout-setting-chg', 'tree-chg', 'reset', ],
+	emits: ['close', 'layout-setting-chg', 'tree-chg', 'reset', 'settings-chg', ],
 });
 </script>
 
-- 
cgit v1.2.3

