From 55d8a5cb85e12b94fee8e11fd6bfc6c65fc03a70 Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Thu, 14 Aug 2025 04:43:08 +0300 Subject: [PATCH] small improvements --- Azaion.Common/Controls/CanvasEditor.cs | 1 + Azaion.Common/Controls/DetectionControl.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Azaion.Common/Controls/CanvasEditor.cs b/Azaion.Common/Controls/CanvasEditor.cs index 7e99166..4529f38 100644 --- a/Azaion.Common/Controls/CanvasEditor.cs +++ b/Azaion.Common/Controls/CanvasEditor.cs @@ -346,6 +346,7 @@ public class CanvasEditor : Canvas _lastPos = e.GetPosition(this); _curRec = (Rectangle)sender; _curAnn = (DetectionControl)((Grid)_curRec.Parent).Parent; + (sender as UIElement)?.CaptureMouse(); e.Handled = true; } diff --git a/Azaion.Common/Controls/DetectionControl.cs b/Azaion.Common/Controls/DetectionControl.cs index bee6a8b..93e92ca 100644 --- a/Azaion.Common/Controls/DetectionControl.cs +++ b/Azaion.Common/Controls/DetectionControl.cs @@ -16,7 +16,6 @@ public class DetectionControl : Border private readonly Grid _grid; private readonly DetectionLabelPanel _detectionLabelPanel; - //private readonly Label _detectionLabel; public readonly Canvas DetectionLabelContainer; public TimeSpan Time { get; set; } @@ -154,6 +153,7 @@ public class DetectionControl : Border Name = name, }; rect.MouseDown += (sender, args) => _resizeStart(sender, args); + rect.MouseUp += (sender, args) => { (sender as UIElement)?.ReleaseMouseCapture(); }; return rect; }