Project: a single unselected folder or data-file drag still reports why; index math saturates (#634 follow-up)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QiAJeFttZp83Fh7YuzAR5f
This commit is contained in:
Claude
2026-10-10 18:51:45 +00:00
parent 72b2e9774e
commit 7a95a0d138
4 changed files with 22 additions and 19 deletions
+1 -1
View File
@@ -2964,7 +2964,7 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
crate::panels::DragPayload::Item(id) => {
// Insert each selected item at the drop point, in selection order.
for (offset, item) in crate::panels::project_drop_items(app, *id).into_iter().enumerate() {
actions.push(("layer.addItem".into(), json!({"item": item, "index": index + offset, "time": time.clone()})));
actions.push(("layer.addItem".into(), json!({"item": item, "index": index.saturating_add(offset), "time": time.clone()})));
}
}
crate::panels::DragPayload::Files(paths) => {