mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Canvas: a press that activates another tile reruns the pass, as in #18273
The new craft-libs pin draws the tiles before the press activates the other document, so the contextual task bar stayed on the old tile for a frame. The same change as in the craft-libs pin PR #18273, so the two merge cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
bebc324fce
commit
e3eb649178
1 file changed
+5
@@ -311,6 +311,11 @@ fn arranged(app: &mut PhotocraftApp, ui: &mut egui::Ui, rect: Rect, active: usiz
|
||||
}
|
||||
}
|
||||
if let Some(d) = selected {
|
||||
// The tiles drew before the press activated another one: run the pass again, so this frame already shows the
|
||||
// contextual task bar on the new active tile and not on the tile that was active.
|
||||
if d != active {
|
||||
ui.ctx().request_discard("a pressed tile became the active document");
|
||||
}
|
||||
app.session.set_active(d);
|
||||
}
|
||||
// A clean document can leave the session immediately, so close only after the pane indices were used.
|
||||
|
||||
Reference in new issue
Block a user