mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 00:34:25 +00:00
fwb2-fix: ToneChannels::listed
(cherry picked from commit d4433f205849b6392e55f0915cd3ad1936f2a402)
This commit is contained in:
@@ -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<ToneChannel>) -> 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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user