Allow clone of text thumbnail
This commit is contained in:
parent
f54f2efa6a
commit
454c3baac1
1 changed files with 4 additions and 2 deletions
|
|
@ -1065,8 +1065,10 @@ impl Clone for ItemThumbnail {
|
||||||
Self::NotImage => Self::NotImage,
|
Self::NotImage => Self::NotImage,
|
||||||
Self::Image(handle, size_opt) => Self::Image(handle.clone(), *size_opt),
|
Self::Image(handle, size_opt) => Self::Image(handle.clone(), *size_opt),
|
||||||
Self::Svg(handle) => Self::Svg(handle.clone()),
|
Self::Svg(handle) => Self::Svg(handle.clone()),
|
||||||
// Content cannot be cloned
|
// Content cannot be cloned simply
|
||||||
Self::Text(content) => Self::NotImage,
|
Self::Text(content) => {
|
||||||
|
Self::Text(widget::text_editor::Content::with_text(&content.text()))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue