fix(timeline): ignore non-media data items dropped onto empty timeline
This commit is contained in:
@@ -1221,11 +1221,13 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.map(ItemId)
|
.map(ItemId)
|
||||||
.filter(|id| {
|
.filter(|id| {
|
||||||
app.session.project.item(*id).is_some_and(|item| matches!(
|
app.session.project.item(*id).is_some_and(|item| match &item.kind {
|
||||||
&item.kind,
|
effectcraft_engine::project::ItemKind::Footage(footage) => {
|
||||||
effectcraft_engine::project::ItemKind::Footage(_)
|
footage.kind != effectcraft_engine::project::FootageKind::Data
|
||||||
| effectcraft_engine::project::ItemKind::Solid(_)
|
}
|
||||||
))
|
effectcraft_engine::project::ItemKind::Solid(_) => true,
|
||||||
|
_ => false,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
if !items.is_empty() {
|
if !items.is_empty() {
|
||||||
|
|||||||
Reference in New Issue
Block a user