Fix inputs being eaten by PathControlPointVisualizer when no control points are selected

This commit is contained in:
OliBomby 2024-08-15 23:11:07 +02:00
parent 29fda745a4
commit 00e210147a
1 changed files with 5 additions and 0 deletions

View File

@ -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;