Ver Fonte

修复重复小节里面选段播放没有效果问题

liushengqiang há 2 anos atrás
pai
commit
66abf15223
1 ficheiros alterados com 4 adições e 4 exclusões
  1. 4 4
      src/state.ts

+ 4 - 4
src/state.ts

@@ -421,10 +421,10 @@ export const handleChangeSection = () => {
 const formateSelectMearure = (_list: any[]): any[] => {
 	if (!_list.length) return [];
 	const list = _list.sort((a, b) => a.time - b.time);
-	const startXml = list[0]?.MeasureNumberXML;
-	const endXml = list.last()?.MeasureNumberXML;
-	const selectStartMeasure = state.times.filter((n: any) => startXml === n.MeasureNumberXML) || [];
-	const selectEndMeasure = state.times.filter((n: any) => endXml === n.MeasureNumberXML) || [];
+	const startXml = list[0]?.measureOpenIndex;
+	const endXml = list.last()?.measureOpenIndex;
+	const selectStartMeasure = state.times.filter((n: any) => startXml === n.measureOpenIndex) || [];
+	const selectEndMeasure = state.times.filter((n: any) => endXml === n.measureOpenIndex) || [];
 	// 没有找到选段小节
 	if (!selectStartMeasure.length || !selectEndMeasure.length) {
 		clearSelection();