Allow clone of text thumbnail

This commit is contained in:
Jeremy Soller 2024-10-10 11:15:23 -06:00
parent f54f2efa6a
commit 454c3baac1
No known key found for this signature in database
GPG key ID: D02FD439211AF56F

View file

@ -1065,8 +1065,10 @@ impl Clone for ItemThumbnail {
Self::NotImage => Self::NotImage,
Self::Image(handle, size_opt) => Self::Image(handle.clone(), *size_opt),
Self::Svg(handle) => Self::Svg(handle.clone()),
// Content cannot be cloned
Self::Text(content) => Self::NotImage,
// Content cannot be cloned simply
Self::Text(content) => {
Self::Text(widget::text_editor::Content::with_text(&content.text()))
}
}
}
}