caoziwu пре 1 дан
родитељ
комит
b04d318179

+ 5 - 0
src/renderer/src/components/simulator/ParamsPanel.vue

@@ -110,7 +110,12 @@ const apply = (): void => {
 
 const onSelectModel = (model: string | null): void => {
   const val = model || 'custom'
+  const device = devicesConfig.find((d) => d.model === val)
   selectedModel.value = val
+  // 若新型号不支持扩展音箱,重置扩展音箱状态,避免残留导致状态错误
+  if (!device?.splMax.extension || device.splMax.extension.length === 0) {
+    isExtension.value = false
+  }
   if (selectedModel.value == 'custom') {
     powerMode.value = ''
   }

+ 1 - 0
src/renderer/src/lib/speaker/jsxgraph/topDiagram.ts

@@ -273,6 +273,7 @@ export function drawTopDiagram(
               strokeOpacity: 0.5,
               layer: 0
             })
+
           addObj('curve', [xCoords, -yCoords], {
             strokeColor: pal.text,
             strokeWidth: 0.5,