Skip to content

Commit

Permalink
Fix #245
Browse files Browse the repository at this point in the history
  • Loading branch information
Equbuxu committed Dec 4, 2021
1 parent 7e0e092 commit d3618dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion PixiEditor/Models/Tools/Tools/SelectTool.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Windows.Controls;
using System.Windows.Input;
Expand Down Expand Up @@ -105,7 +106,11 @@ private void Select(List<Coordinates> pixels, SelectionShape shape)

BitmapManager.ActiveDocument.ActiveSelection.SetSelection(oldSelectedPoints, SelectionType.New);

if (shape == SelectionShape.Circle)
if (pixels.Count < 2)
{
selection = new List<Coordinates>();
}
else if (shape == SelectionShape.Circle)
{
selection = GetCircleSelectionForPoints(pixels[^1], pixels[0]);
}
Expand Down

0 comments on commit d3618dd

Please sign in to comment.