Dim the histogram while the canvas shows a draft
The histogram is measured on settled frames only, so during a drag it describes the frame from before the gesture while the canvas shows something newer, and nothing said so. The draft flag stopped at the render closure. It now reaches the interface: `canvas-draft` on the window and `Levels.provisional` for the readouts, both set on every canvas render from the flag that chose the frame's resolution, and cleared when a render fails. The histogram panel dims its display reading to half while a draft is up and brings it back when the frame settles. Dimmed rather than captioned, because a caption appearing on every drag would move the column; the raw reading has no frame to lag and is left alone.
This commit is contained in:
@@ -2292,7 +2292,15 @@ fn build_render_now(
|
||||
|
||||
match rendered {
|
||||
Ok(image) => {
|
||||
// TRACES: FR-DSP-4
|
||||
// **The draft flag goes past the render**, to the places
|
||||
// that have to know which kind of frame is up: the canvas,
|
||||
// and the histogram, which is measured on settled frames
|
||||
// only and so describes an older frame while a draft is
|
||||
// showing.
|
||||
window.set_canvas(image);
|
||||
window.set_canvas_draft(draft);
|
||||
window.global::<Levels>().set_provisional(draft);
|
||||
window.set_load_error("".into());
|
||||
// The readout and the "Fit" button follow the session
|
||||
// rather than the gesture, so a clamped zoom shows the
|
||||
@@ -2383,6 +2391,8 @@ fn build_render_now(
|
||||
Err(e) => {
|
||||
log::warn!("render failed: {e}");
|
||||
window.set_load_error(e.into());
|
||||
window.set_canvas_draft(false);
|
||||
window.global::<Levels>().set_provisional(false);
|
||||
// No frame, so nothing to describe. The stale plot would
|
||||
// otherwise sit beside the error message looking current.
|
||||
window.global::<Levels>().set_data(histogram::empty());
|
||||
|
||||
Reference in New Issue
Block a user