Skip to content

Commit

Permalink
Fix the notorious window dragging crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Equbuxu committed Dec 2, 2023
1 parent 5db10cb commit 9f439a3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/PixiEditor/Helpers/Converters/ReciprocalConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ public override object Convert(object value, Type targetType, object parameter,
{
if (value is not double num)
return DependencyProperty.UnsetValue;

double result;
if (parameter is not double mult)
return 1 / num;
return mult / num;
result = 1 / num;
else
result = mult / num;

return Math.Clamp(result, 1e-15, 1e15);
}
}

0 comments on commit 9f439a3

Please sign in to comment.