Browse Source

Fixed selection bug

Krzysztof Krysiński 1 month ago
parent
commit
1a5723407e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/PixiEditor/Views/Overlays/PathOverlay/VectorPathOverlay.cs

+ 3 - 2
src/PixiEditor/Views/Overlays/PathOverlay/VectorPathOverlay.cs

@@ -148,8 +148,9 @@ public class VectorPathOverlay : Overlay
                 }
                 }
 
 
                 var handle = anchorHandles[anchorIndex];
                 var handle = anchorHandles[anchorIndex];
-                bool nextIsSelected = anchorIndex + 1 < anchorHandles.Count &&
-                                      anchorHandles[anchorIndex + 1].IsSelected;
+                var nextIndex = subPath.GetNextPoint(anchorIndex).Index;
+                bool nextIsSelected = nextIndex < anchorHandles.Count &&
+                                      anchorHandles[nextIndex].IsSelected;
                 bool previousIsSelected = anchorIndex - 1 >= 0 &&
                 bool previousIsSelected = anchorIndex - 1 >= 0 &&
                                           anchorHandles[anchorIndex - 1].IsSelected;
                                           anchorHandles[anchorIndex - 1].IsSelected;
                 bool drawControl1 = handle.IsSelected;
                 bool drawControl1 = handle.IsSelected;