Browse Source

Fixed colorpicker stop picking outside bounds bug

flabbet 5 years ago
parent
commit
5a65712eb1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      PixiEditor/Views/ColorPicker.xaml.cs

+ 5 - 0
PixiEditor/Views/ColorPicker.xaml.cs

@@ -135,6 +135,11 @@ namespace PixiEditor.Views
         {
             _dispatcher.Invoke(() =>
             {
+                if (Mouse.LeftButton == MouseButtonState.Released)
+                {
+                    _timer.Stop();
+                    return;
+                }
                 System.Drawing.Point point = MousePositionConverter.GetCursorPosition();
                 Point relativePoint = _colorPalette.PointFromScreen(new Point(point.X, point.Y));
                 CalculateColor(relativePoint);