Skip to content

Commit

Permalink
Fix inputs being eaten by PathControlPointVisualizer when no control …
Browse files Browse the repository at this point in the history
…points are selected
  • Loading branch information
OliBomby committed Aug 15, 2024
1 parent 29fda74 commit 00e2101
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,13 @@ protected override bool OnKeyDown(KeyDownEvent e)
if (!e.AltPressed)
return false;

// If no pieces are selected, we can't change the path type.
if (Pieces.All(p => !p.IsSelected.Value))
return false;

var type = path_types[e.Key - Key.Number1];

// The first control point can never be inherit type
if (Pieces[0].IsSelected.Value && type == null)
return false;

Expand Down

0 comments on commit 00e2101

Please sign in to comment.