🐛 Fix problem on component swap

This commit is contained in:
alonso.torres 2026-04-21 13:09:21 +02:00
parent 3da74ed864
commit f89f4e0047

View File

@ -314,9 +314,9 @@ pub extern "C" fn set_shape_grow_type(grow_type: u8) {
with_current_shape_mut!(state, |shape: &mut Shape| {
if let Type::Text(text_content) = &mut shape.shape_type {
text_content.set_grow_type(GrowType::from(grow_type));
} else {
panic!("Trying to update grow type in a shape that it's not a text shape");
}
// Don't throw error if the object is not text.
// On swap component opperations is convenient.
});
}