small improvements

This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-08-14 04:43:08 +03:00
parent 61c93e9c88
commit 55d8a5cb85
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -346,6 +346,7 @@ public class CanvasEditor : Canvas
_lastPos = e.GetPosition(this); _lastPos = e.GetPosition(this);
_curRec = (Rectangle)sender; _curRec = (Rectangle)sender;
_curAnn = (DetectionControl)((Grid)_curRec.Parent).Parent; _curAnn = (DetectionControl)((Grid)_curRec.Parent).Parent;
(sender as UIElement)?.CaptureMouse();
e.Handled = true; e.Handled = true;
} }
+1 -1
View File
@@ -16,7 +16,6 @@ public class DetectionControl : Border
private readonly Grid _grid; private readonly Grid _grid;
private readonly DetectionLabelPanel _detectionLabelPanel; private readonly DetectionLabelPanel _detectionLabelPanel;
//private readonly Label _detectionLabel;
public readonly Canvas DetectionLabelContainer; public readonly Canvas DetectionLabelContainer;
public TimeSpan Time { get; set; } public TimeSpan Time { get; set; }
@@ -154,6 +153,7 @@ public class DetectionControl : Border
Name = name, Name = name,
}; };
rect.MouseDown += (sender, args) => _resizeStart(sender, args); rect.MouseDown += (sender, args) => _resizeStart(sender, args);
rect.MouseUp += (sender, args) => { (sender as UIElement)?.ReleaseMouseCapture(); };
return rect; return rect;
} }