mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
Integration: snapshot 0 has a source cell, one Czech "New Snapshot" (#3567)
With #3567 the opening snapshot row gets the History Brush source column too, so the panel test clicks the second snapshot cell. #3567 and main both added a Czech "New Snapshot"; main's translation pass ("Vytvořit snímek") stays. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5a9a8ff9e8
commit
b367a6118f
2 files changed
+5
-4
No files matched your search
@@ -1040,7 +1040,6 @@
|
||||
From: Z:
|
||||
Full Document Celý dokument
|
||||
Merged Layers Sloučené vrstvy
|
||||
New Snapshot Nový snímek
|
||||
Create new tool preset Vytvořit nové přednastavení nástroje
|
||||
Crop Factor Crop faktor
|
||||
Ctrl Ctrl
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -5631,11 +5631,13 @@ mod history_transform_tests {
|
||||
app.run("history.newSnapshot", json!({})).unwrap();
|
||||
let mut h = Harness::builder().with_size(vec2(300.0, 400.0)).build_ui_state(|ui, app: &mut PhotocraftApp| history(app, ui), app);
|
||||
h.run_steps(2);
|
||||
// The snapshot row's cell is the only 24×38 one (the opening row has no column).
|
||||
let cells: Vec<Rect> = h
|
||||
// Snapshot rows' cells are the 24×38 ones: the opening snapshot (0) first, then the new one.
|
||||
let mut cells: Vec<Rect> = h
|
||||
.ctx
|
||||
.viewport(|v| v.prev_pass.widgets.layers().flat_map(|(_, w)| w.iter()).filter(|w| w.rect.size() == vec2(24.0, 38.0)).map(|w| w.rect).collect());
|
||||
let cell = *cells.first().expect("a snapshot source cell");
|
||||
cells.sort_by(|a, b| a.top().total_cmp(&b.top()));
|
||||
assert_eq!(cells.len(), 2, "a source cell on each snapshot row");
|
||||
let cell = cells[1];
|
||||
click(&mut h, cell.center());
|
||||
let st = h.state().session.active().unwrap();
|
||||
assert_eq!(photocraft_engine::history_source_cmds::source(st), Some(HistorySource::Snapshot(1)));
|
||||
|
||||
Reference in new issue
Block a user