From b4e932581c9e90aae3005078bc00332fcd94caee Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Tue, 14 Jan 2025 02:41:20 +0100 Subject: [PATCH] fix setting default alignment --- .../ExtensionSettings/SiteExtensionSettings.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/csui/src/PlayerUiPanels/PanelComponents/ExtensionSettings/SiteExtensionSettings.vue b/src/csui/src/PlayerUiPanels/PanelComponents/ExtensionSettings/SiteExtensionSettings.vue index a1eb78d..7d6b0f3 100644 --- a/src/csui/src/PlayerUiPanels/PanelComponents/ExtensionSettings/SiteExtensionSettings.vue +++ b/src/csui/src/PlayerUiPanels/PanelComponents/ExtensionSettings/SiteExtensionSettings.vue @@ -401,8 +401,15 @@ export default { commandArguments = undefined; } - await this.siteSettings.set(option, commandArguments); - this.$nextTick( () => this.$forceUpdate() ); + await this.siteSettings.set(option, commandArguments, {reload: false}); + + // changing alignment options doesn't trigger re-compute, so we need to do it ourselves. + // note that this re-computes siteDefaultAlignment even when setting other options, but + // it's _too late AM_ and hit to performance probably isn't bad enough to warrant + // spending time on a more correct solution tomorrow + this._computedWatchers.siteDefaultAlignment.run(); + + this.$nextTick( () => this.$forceUpdate()); }, setExtensionMode(component, event) { const option = event.target.value;