Allow selecting empty control point groups

This commit is contained in:
OliBomby 2023-08-17 16:30:18 +02:00
parent cb23f03d4b
commit 360f9750e1
1 changed files with 4 additions and 0 deletions

View File

@ -147,6 +147,10 @@ private void trackActivePoint()
trackedType = null;
else
{
// If the selected group has no control points, clear the tracked type.
// Otherwise the user will be unable to select a group with no control points.
if (selectedGroup.Value.ControlPoints.Count == 0)
trackedType = null;
// If the selected group only has one control point, update the tracking type.
if (selectedGroup.Value.ControlPoints.Count == 1)
trackedType = selectedGroup.Value?.ControlPoints.Single().GetType();