Color management: proof view commands redraw only when the view changes

view.proofSetup, view.proofColors, view.overprintPreview and
view.separationsPreview stored the proof view and raised every open
document's revision on each run. They did this also when the request
asked for the view that was already showing, for example Proof Colors on
while it is on, or Proof Setup with no params. Each such run redrew every
canvas. When the active document's revision changes, the canvas also
sends a tool that asks for it a new hover event, although the pointer has
not moved.

- The four commands compare the new proof view with the current one. When
  the two are equal, the commands leave the view and the revisions as
  they are. Separations Preview's visible plates are compared as a set,
  so the same plates in another order do not redraw.
- view.separationsPreview with `plates` naming a plate twice shows it
  once, so one `toggle` of that plate hides it.
- color.loadProfile with a new file of the CMYK profile that Proof Setup
  targets gives the documents new revisions, as it does for a working
  space. Before, running Proof Setup again redrew the documents through
  the new file; it now leaves an unchanged view alone.
- color.removeProfile gives the documents new revisions only when Proof
  Setup targets the removed profile.
This commit is contained in:
dotCooCoo
2026-11-12 10:32:02 -08:00
parent a15a4abc5c
commit 344d756bf6
6 changed files with 206 additions and 14 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ pub(crate) fn strip_replay_only(id: &str, p: &mut Value) {
/// Queries that apply the edit the active tool is computing before they run, as edits do
/// ([`Session::finish_tool_edit`]): a batch runs edits, Find Objects with `select`, Select All
/// Instances and Lock Guides change the selection, and the proof views, the preferences and added
/// fonts give the documents new revisions (they draw again, and type lays out again).
/// fonts can give the documents new revisions (they draw again, and type lays out again).
const WAIT_FOR_TOOL_EDIT: &[&str] = &[
"script.run",
"command.batch",