fixed selection on editor

fixed image view and play
This commit is contained in:
Alex Bezdieniezhnykh
2025-07-11 22:46:25 +03:00
parent 938fd36aec
commit fefd054ea0
3 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -304,7 +304,7 @@ public partial class Annotator
{
if (File.Exists(annotation.ImagePath))
{
Editor.SetImageSource(await annotation.ImagePath.OpenImage());
Editor.SetBackground(await annotation.ImagePath.OpenImage());
_formState.BackgroundTime = annotation.Time;
videoSize = Editor.RenderSize;
}
@@ -534,7 +534,7 @@ public partial class Annotator
if (LvFiles.SelectedIndex == -1)
LvFiles.SelectedIndex = 0;
Dispatcher.Invoke(() => Editor.ResetBackground());
Dispatcher.Invoke(() => Editor.SetBackground(null));
IsInferenceNow = true;
AIDetectBtn.IsEnabled = false;
+3 -3
View File
@@ -143,7 +143,7 @@ public class AnnotatorEventHandler(
if (formState.BackgroundTime.HasValue)
{
mainWindow.Editor.ResetBackground();
mainWindow.Editor.SetBackground(null);
formState.BackgroundTime = null;
}
break;
@@ -226,7 +226,7 @@ public class AnnotatorEventHandler(
if (mainWindow.LvFiles.SelectedItem == null)
return;
var mediaInfo = (MediaFileInfo)mainWindow.LvFiles.SelectedItem;
mainWindow.Editor.ResetBackground();
mainWindow.Editor.SetBackground(null);
formState.CurrentMedia = mediaInfo;
mainWindow.Title = $"Azaion Annotator - {mediaInfo.Name}";
@@ -262,7 +262,7 @@ public class AnnotatorEventHandler(
if (formState.BackgroundTime.HasValue)
{
//no need to save image, it's already there, just remove background
mainWindow.Editor.ResetBackground();
mainWindow.Editor.SetBackground(null);
formState.BackgroundTime = null;
//next item