diff --git a/src/Titano.App/Library/LibraryActions.cs b/src/Titano.App/Library/LibraryActions.cs index e6a352f3..e3238fe9 100644 --- a/src/Titano.App/Library/LibraryActions.cs +++ b/src/Titano.App/Library/LibraryActions.cs @@ -87,10 +87,12 @@ public sealed class LibraryActions(ShellViewModel shell) return; } if (Services.Database is not { } db) return; + // The project as stored now: the editor may have changed it since the card was read. + var current = await db.Sequences.GetAsync(sequence.Id) ?? sequence; var first = (await db.Frames.ListBySequenceAsync(sequence.Id, -1, 1)).FirstOrDefault(); var (w, h) = first is null ? (0, 0) : first.Orientation is >= 5 and <= 8 ? (first.Height, first.Width) : (first.Width, first.Height); - var export = Project(sequence.SettingsJson).Export with { Batch = [] }; - await QueueAsync(ProcessingJobs.Render(sequence, export, w, h)); + var export = Project(current.SettingsJson).Export with { Batch = [] }; + await QueueAsync(ProcessingJobs.Render(current, export, w, h)); } /// Runs one row action of the sync table on a sequence (the card's Sync, a mass Upload or Download); false when it could not start. diff --git a/tests/Titano.Data.Tests/Repositories/CatalogRepositoryTests.cs b/tests/Titano.Data.Tests/Repositories/CatalogRepositoryTests.cs index 3b0b29a0..968fbcd7 100644 --- a/tests/Titano.Data.Tests/Repositories/CatalogRepositoryTests.cs +++ b/tests/Titano.Data.Tests/Repositories/CatalogRepositoryTests.cs @@ -98,11 +98,17 @@ public abstract class CatalogRepositoryTests(TestContext context) : RepositoryTe var owner = Guid.CreateVersion7(); var harbour = TestData.Sequence(main.Id, new DateTime(2024, 6, 1), "Porto di CITTÀ vecchia") with { - Status = SequenceStatus.AnalyzedLight, Tags = ["sea"], RenderedCount = 2, + Status = SequenceStatus.AnalyzedLight, + Tags = ["sea"], + RenderedCount = 2, }; var stars = TestData.Sequence(main.Id, new DateTime(2025, 1, 2), "Milky way", "Z8") with { - CameraMake = "Nikon", Tags = ["Night Sky"], OwnerUserId = owner, Origin = SequenceOrigin.Server, SyncState = SyncState.LocalAhead, + CameraMake = "Nikon", + Tags = ["Night Sky"], + OwnerUserId = owner, + Origin = SequenceOrigin.Server, + SyncState = SyncState.LocalAhead, }; var clouds = TestData.Sequence(main.Id, new DateTime(2024, 12, 31, 23, 59, 59), "50%_clouds") with { Status = SequenceStatus.AnalyzedLight | SequenceStatus.Verified }; var elsewhere = TestData.Sequence(other.Id, new DateTime(2024, 3, 3), "Elsewhere");