diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 9ba1fc0..37f7795 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -1476,8 +1476,8 @@ export default class ClientConnection { } public async SetBlendingOption( - id: number, - value: number + id: string, + value: string ) { return await this.doRpc( new Protocol.SetBlendingOptionRequestEntity( diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 5e881ea..3604d88 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -148,13 +148,13 @@ show_dialog.value = true; }; const send_hide_desktop = () => { - set?.SetBlendingOption(0, hide_desktop_value.value ? 1 : 0); + set?.SetBlendingOption(hide_desktop_value_id.value, hide_desktop_value.value ? "1" : "0"); }; const send_disable_blending_params = () => { - set?.SetBlendingOption(1, disable_blending_params.value ? 1 : 0); + set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0"); }; const send_show_blending_grids = () => { - set?.SetBlendingOption(1000, show_blending_grids.value ? 1 : 0); + set?.SetBlendingOption(show_blending_grids_id.value, show_blending_grids.value ? "1" : "0"); }; const resetall=()=>{ set?.ResetBlendingConfig() @@ -163,8 +163,11 @@ const EnableBlending = ref(false); let optionsstr = ref(); optionsstr.value = "FusionLocale"; - const hide_desktop_value = ref(true); + const hide_desktop_value_id = ref("0"); + const hide_desktop_value = ref(false); + const disable_blending_params_id = ref("1"); const disable_blending_params = ref(false); + const show_blending_grids_id = ref("show_blending_grids"); const show_blending_grids = ref(false); const options = computed({ get() { @@ -247,18 +250,19 @@ set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); //console.log(tmp.options[0][1]) - let local_options = [ [ref(0), hide_desktop_value], [ref(1), disable_blending_params], [ref(1000), show_blending_grids] ]; + let local_options = [ + [hide_desktop_value_id, hide_desktop_value], + [disable_blending_params_id, disable_blending_params], + [show_blending_grids_id, show_blending_grids] + ]; let k:any; for(k in local_options) { let local_opt = local_options[k]; - let ii:any; - for(ii in tmp.options){ - let opt = tmp.options[ii]; - if (2 == opt.length && local_opt[0].value == opt[0]){ - local_opt[1].value = (opt[1] == 0 ? false : true); - break; - } - } + let opt = tmp.options[(local_opt[0].value)]; + if (opt) + { + local_opt[1].value = ("0" == opt || "false" == opt.toLowerCase() ? false : true); + } } }); }, 1000); diff --git a/src/entities/WSProtocol.ts b/src/entities/WSProtocol.ts index ec7d2f3..be1d1d2 100644 --- a/src/entities/WSProtocol.ts +++ b/src/entities/WSProtocol.ts @@ -3469,8 +3469,8 @@ export namespace Protocol { export class SetBlendingOptionRequestEntity extends PacketEntity { constructor( - id: number, - value: number, + id: string, + value: string, rpc_id = 0 ) { super(); @@ -3478,10 +3478,10 @@ export namespace Protocol { super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; - this.id = id ?? 0; - this.value = value ?? 0; + this.id = id ?? ""; + this.value = value ?? ""; } - id = 0; - value = 0; + id; + value; } }