fix(app): editor review fixes for saving, undo, preview, commands and layout
- Undo/redo snapshots take outside changes (advice, merged edits) on Replace; a drag, click or key press ends a merged run; Reset to Auto is its own step. - A failed save stays pending and is retried with backoff; closing or switching asks before discarding it; the local source throws unless the index took it. - Opening a sequence survives any failure; the window title follows the editor; the job bar hides when idle in the editor. - Render, Add to queue and Batch re-read their state; disabled commands say why; Analyse is disabled while queued and announces its cost and Ctrl+Shift+A. - Preview: 1:1 and wheel zoom render the source's own pixels, the view keeps its place across resolutions, crop mask result mode, unreadable frames say so, labelled tools, keyboard focus on open, tools hidden on Export lose their effect. - Preparation re-solves from measured series (no re-decode per slider step) with a half-precision frame cache. - Exposure flicker and waveform charts, Time plan chart, Camera crop margins, sortable frame table, wrapped findings, responsive preset cards, render-done follow-up, Jobs history filtered on the sequence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
32 files changed
+1612
-369
No files matched your search
@@ -159,8 +159,8 @@
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="{StaticResource Radius.Card}">
|
||||
<Grid>
|
||||
<v:PreviewSurface x:Name="PART_Surface" CornerRadius="8" />
|
||||
<ContentPresenter Content="{TemplateBinding ToolsContent}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="12" />
|
||||
<Grid x:Name="Info" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="12" IsHitTestVisible="False">
|
||||
<ContentPresenter x:Name="PART_Tools" Content="{TemplateBinding ToolsContent}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="12" />
|
||||
<Grid x:Name="PART_Info" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="12" IsHitTestVisible="False">
|
||||
<Border Background="{DynamicResource Brush.Chrome}" Opacity="0.85" CornerRadius="{StaticResource Radius.Control}" />
|
||||
<TextBlock Text="{TemplateBinding InfoText}" Margin="10,6" Typography.NumeralAlignment="Tabular" TextTrimming="CharacterEllipsis" />
|
||||
</Grid>
|
||||
@@ -168,10 +168,10 @@
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="InfoText" Value="{x:Null}">
|
||||
<Setter TargetName="Info" Property="Visibility" Value="Collapsed" />
|
||||
<Setter TargetName="PART_Info" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="InfoText" Value="">
|
||||
<Setter TargetName="Info" Property="Visibility" Value="Collapsed" />
|
||||
<Setter TargetName="PART_Info" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -42,9 +42,13 @@ public readonly record struct MotionVector(float X, float Y, float Dx, float Dy)
|
||||
/// Fit and 1:1; Ctrl+0 fits, Ctrl+1 shows 1:1.
|
||||
/// </summary>
|
||||
[TemplatePart(Name = PartSurface, Type = typeof(FrameworkElement))]
|
||||
[TemplatePart(Name = PartTools, Type = typeof(FrameworkElement))]
|
||||
[TemplatePart(Name = PartInfo, Type = typeof(FrameworkElement))]
|
||||
public class PreviewViewport : Control
|
||||
{
|
||||
public const string PartSurface = "PART_Surface";
|
||||
public const string PartTools = "PART_Tools";
|
||||
public const string PartInfo = "PART_Info";
|
||||
|
||||
public static readonly RoutedCommand FitCommand = new(nameof(FitCommand), typeof(PreviewViewport), [new KeyGesture(Key.D0, ModifierKeys.Control)]);
|
||||
public static readonly RoutedCommand ActualSizeCommand = new(nameof(ActualSizeCommand), typeof(PreviewViewport), [new KeyGesture(Key.D1, ModifierKeys.Control)]);
|
||||
@@ -106,6 +110,8 @@ public class PreviewViewport : Control
|
||||
private const double DividerGrip = 6;
|
||||
|
||||
private PreviewSurface? _surface;
|
||||
private FrameworkElement? _tools;
|
||||
private FrameworkElement? _info;
|
||||
private ViewTransform _view = new(1, 0, 0);
|
||||
private Size _imageSize = Size.Empty;
|
||||
private bool _syncingZoom;
|
||||
@@ -192,6 +198,8 @@ public class PreviewViewport : Control
|
||||
{
|
||||
if (_surface is not null) _surface.SizeChanged -= OnSurfaceSizeChanged;
|
||||
base.OnApplyTemplate();
|
||||
_tools = GetTemplateChild(PartTools) as FrameworkElement;
|
||||
_info = GetTemplateChild(PartInfo) as FrameworkElement;
|
||||
_surface = GetTemplateChild(PartSurface) as PreviewSurface;
|
||||
if (_surface is null) return;
|
||||
_surface.Owner = this;
|
||||
@@ -200,6 +208,19 @@ public class PreviewViewport : Control
|
||||
ApplyZoomMode();
|
||||
}
|
||||
|
||||
/// <summary>The shot data pill sits beside the tools at the bottom, and moves to the top when both do not fit in one row.</summary>
|
||||
protected override Size ArrangeOverride(Size arrangeBounds)
|
||||
{
|
||||
var size = base.ArrangeOverride(arrangeBounds);
|
||||
if (_tools is not null && _info is not null)
|
||||
{
|
||||
var needed = _tools.DesiredSize.Width + _info.DesiredSize.Width;
|
||||
var place = needed > arrangeBounds.Width ? VerticalAlignment.Top : VerticalAlignment.Bottom;
|
||||
if (_info.VerticalAlignment != place) _info.VerticalAlignment = place;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
|
||||
{
|
||||
base.OnMouseLeftButtonDown(e);
|
||||
@@ -285,6 +306,9 @@ public class PreviewViewport : Control
|
||||
var viewport = (PreviewViewport)d;
|
||||
var size = PixelSize(viewport.Source);
|
||||
var resized = size != viewport._imageSize;
|
||||
// The same picture at another resolution (a 1:1 render replacing the fitted one) keeps what is on screen.
|
||||
if (resized && !size.IsEmpty && !viewport._imageSize.IsEmpty && viewport._view.Scale > 0)
|
||||
viewport._view = viewport._view with { Scale = viewport._view.Scale * viewport._imageSize.Width / size.Width };
|
||||
viewport._imageSize = size;
|
||||
viewport._surface?.SetImages(viewport.Source, viewport.OriginalSource, size);
|
||||
// Same-size frames (scrubbing) keep zoom and pan; a new size refits or re-clamps.
|
||||
|
||||
Reference in new issue
Block a user