jsonwang 3 лет назад
Родитель
Сommit
d655470d32

+ 8 - 2
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -1302,7 +1302,10 @@ extension PQStuckPointEditerController {
 
     func clipPoint(clipCount: Int, oldPoints: Array<Float>) {
         BFLog(message: "拼接卡点数:\(clipCount)")
-
+        if(clipCount < 0){
+            BFLog(message: "clipCount is error!!!! \(clipCount)")
+            return
+        }
         // 如果是第一次拼接先补第0位
         if finallyStuckPoints.count == 0 {
             finallyStuckPoints.append(stuckPointsTemp.first ?? 0.0)
@@ -1512,7 +1515,10 @@ extension PQStuckPointEditerController {
             // lastCyclesSelectIndex != -1 已经设置过循环次数 应该是手动设置的值
             if lastCyclesSelectIndex != -1 {
                 // 纯图片时 已经默认添加一次循环 所以要用lastCyclesSelectIndex - 1
-                clipPoint(clipCount: selectedImageDataCount * lastCyclesSelectIndex - 1, oldPoints: stuckPointsTemp)
+                if(lastCyclesSelectIndex != 0){
+                    clipPoint(clipCount: selectedImageDataCount * lastCyclesSelectIndex - 1, oldPoints: stuckPointsTemp)
+                }
+           
 
             } else {
                 lastCyclesSelectIndex = 0