mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 19:08:05 +08:00
Fix crash upon setting stroke color to none
This commit is contained in:
@@ -109,7 +109,7 @@ impl<'a> ModifyInputsContext<'a> {
|
||||
|
||||
fn stroke_set(&mut self, stroke: Stroke) {
|
||||
self.modify_inputs("Stroke", false, |inputs| {
|
||||
inputs[1] = NodeInput::value(TaggedValue::Color(stroke.color.unwrap_or_default()), false);
|
||||
inputs[1] = NodeInput::value(TaggedValue::OptionalColor(stroke.color), false);
|
||||
inputs[2] = NodeInput::value(TaggedValue::F64(stroke.weight), false);
|
||||
inputs[3] = NodeInput::value(TaggedValue::VecF32(stroke.dash_lengths), false);
|
||||
inputs[4] = NodeInput::value(TaggedValue::F64(stroke.dash_offset), false);
|
||||
|
||||
@@ -722,7 +722,7 @@ fn static_nodes() -> Vec<DocumentNodeType> {
|
||||
identifier: NodeImplementation::proto("graphene_core::vector::SetStrokeNode<_, _, _, _, _, _, _>"),
|
||||
inputs: vec![
|
||||
DocumentInputType::value("Vector Data", TaggedValue::VectorData(graphene_core::vector::VectorData::empty()), true),
|
||||
DocumentInputType::value("Color", TaggedValue::Color(Color::BLACK), false),
|
||||
DocumentInputType::value("Color", TaggedValue::OptionalColor(Some(Color::BLACK)), false),
|
||||
DocumentInputType::value("Weight", TaggedValue::F64(0.), false),
|
||||
DocumentInputType::value("Dash Lengths", TaggedValue::VecF32(Vec::new()), false),
|
||||
DocumentInputType::value("Dash Offset", TaggedValue::F64(0.), false),
|
||||
|
||||
Reference in New Issue
Block a user