From 1dcd9eb39aece2e80400b92ce29aea7474ae559c Mon Sep 17 00:00:00 2001 From: aiongg Date: Sun, 15 Nov 2026 11:55:53 +0000 Subject: [PATCH] fwb2-fix: ToneChannels::listed (cherry picked from commit d4433f205849b6392e55f0915cd3ad1936f2a402) --- crates/imaging/src/ui/adjust/context.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/imaging/src/ui/adjust/context.rs b/crates/imaging/src/ui/adjust/context.rs index 8ef835ab3..d9d1d76a1 100644 --- a/crates/imaging/src/ui/adjust/context.rs +++ b/crates/imaging/src/ui/adjust/context.rs @@ -214,6 +214,14 @@ impl ToneChannels { Self { channels: vec![channel], gray: false, isolated: true } } + /// The channels of a colour set the host isolated (Image › Curves with several Channels-panel targets + /// selected, storytold/photocraft#5335), in Channel-select order: a combined entry (a neutral + /// [`Named`](ToneChannel::Named) channel) and then the selected components. No entry is a composite, so Curves + /// overlays no other channel. + pub fn listed(channels: Vec) -> Self { + Self { channels, gray: false, isolated: false } + } + /// The channels in order. pub fn as_slice(&self) -> &[ToneChannel] { &self.channels @@ -224,7 +232,7 @@ impl ToneChannels { self.channels.len() } - /// Whether the list is empty (never for [`of`](Self::of)). + /// Whether the list is empty (never for [`of`](Self::of) and [`isolated`](Self::isolated)). pub fn is_empty(&self) -> bool { self.channels.is_empty() }