fix(app): the Render quick action reads the project as stored now
The card may predate an edit made in the editor, so the render takes the sequence's current row. Whitespace of a catalog test follows the formatter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
2 files changed
+12
-4
No files matched your search
@@ -87,10 +87,12 @@ public sealed class LibraryActions(ShellViewModel shell)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Services.Database is not { } db) 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 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 (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 = [] };
|
var export = Project(current.SettingsJson).Export with { Batch = [] };
|
||||||
await QueueAsync(ProcessingJobs.Render(sequence, export, w, h));
|
await QueueAsync(ProcessingJobs.Render(current, export, w, h));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>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.</summary>
|
/// <summary>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.</summary>
|
||||||
|
|||||||
@@ -98,11 +98,17 @@ public abstract class CatalogRepositoryTests(TestContext context) : RepositoryTe
|
|||||||
var owner = Guid.CreateVersion7();
|
var owner = Guid.CreateVersion7();
|
||||||
var harbour = TestData.Sequence(main.Id, new DateTime(2024, 6, 1), "Porto di CITTÀ vecchia") with
|
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
|
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 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");
|
var elsewhere = TestData.Sequence(other.Id, new DateTime(2024, 3, 3), "Elsewhere");
|
||||||
|
|||||||
Reference in new issue
Block a user