mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Store an appearance's paint as a bare Graphic rather than a single-element List<Graphic> (#4435)
Rank the coverage's paint attribute down from List<Graphic> to Graphic
This commit is contained in:
@@ -707,14 +707,14 @@ impl TaggedValue {
|
||||
}
|
||||
}
|
||||
|
||||
/// The stored form of a paint input's red-slash "no paint" choice: the `List<Graphic>` type default, materializing as an empty paint list.
|
||||
/// The stored form of a paint input's red-slash "no paint" choice: the `Item<Graphic>` type default, materializing as a `Graphic::None` paint.
|
||||
pub fn no_paint() -> Self {
|
||||
TaggedValue::TypeDefault(list!(Graphic))
|
||||
TaggedValue::TypeDefault(item!(Graphic))
|
||||
}
|
||||
|
||||
/// Whether this is the `List<Graphic>` type default created by [`Self::no_paint`] (and by disconnecting a paint wire).
|
||||
/// Whether this is the `Item<Graphic>` type default created by [`Self::no_paint`] (and by disconnecting a paint wire).
|
||||
pub fn is_no_paint(&self) -> bool {
|
||||
matches!(self, TaggedValue::TypeDefault(td) if *td == list!(Graphic))
|
||||
matches!(self, TaggedValue::TypeDefault(td) if *td == item!(Graphic))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user