From b0350c64c1d3e3466aee456c979f19ff8fd1edc9 Mon Sep 17 00:00:00 2001 From: abc2cb <271337822+abc2cb@users.noreply.github.com> Date: Fri, 16 Oct 2026 16:41:04 +0300 Subject: [PATCH] Session::start: drop the checks main moved into admit The merge with main kept the old precondition, job conflict and hidden layer checks next to main's `self.admit(...)` (#5684), which runs the same checks, so every started command was checked twice. The New Effects disclosure block now follows admit, as it followed those checks before. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/jobs.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/crates/engine/src/jobs.rs b/crates/engine/src/jobs.rs index 9f71e6a3ff..6d325ccd5e 100644 --- a/crates/engine/src/jobs.rs +++ b/crates/engine/src/jobs.rs @@ -713,17 +713,7 @@ impl Session { return Ok(Started::Done(v)); } // Pixel commands follow the Channels panel target unless the caller names one. - let run_params = crate::channel_cmds::inject_target(self, id, crate::commands::inject_kind(id, params.clone())); - if let Err(why) = self.explicit_layer_enabled(spec, ¶ms).unwrap_or_else(|| self.precondition(spec, &run_params)) { - return Err(EngineError::Disabled(id.to_string(), why)); - } - if let Some(why) = self.job_conflict(id, spec.journal) { - return Err(EngineError::Disabled(id.to_string(), why)); - } - // Painting on or moving a hidden layer is refused, as in Photoshop (#571). - if let Some(why) = crate::hidden_target::refusal(self, id, ¶ms) { - return Err(EngineError::Other(why.into())); - } + let run_params = self.admit(id, spec, ¶ms)?; // This UI-only disclosure preference applies to both `execute` and `start`: // desktop UI normally calls `start`, even for synchronous Layer Style commands. let new_fx_target = if id.starts_with("layer.layerStyle.") { @@ -735,7 +725,6 @@ impl Session { None }; let expand_new_fx = crate::commands::layer_panel_option(self, "expandNewEffects", true); - let run_params = self.admit(id, spec, ¶ms)?; self.coalesce_request = params.get("coalesce").and_then(Value::as_str).map(str::to_string); self.color_restrict = crate::channel_cmds::color_restriction(self, id, &run_params); self.jobs.spawn = background;