FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust
timeline: Escape during a box selection restores the selection it began with (#608 + #1028 regression)
Brandon Thomasb10d24ef5ce3
diff --git a/crates/ui-egui/src/panels/timeline.rs b/crates/ui-egui/src/panels/timeline.rsindex 19a31764f..35a66ce32 100644--- a/crates/ui-egui/src/panels/timeline.rs+++ b/crates/ui-egui/src/panels/timeline.rs@@ -2352,7 +2352,10 @@ fn interact(app: &mut FilmcraftApp, ui: &mut egui::Ui, seq: &Sequence, layout: &// ---- Escape abandons the drag: the release commits nothing and the clips stay put (#580)if app.tl.drag.is_some() && ctx.input(|i| i.key_pressed(egui::Key::Escape)) {- app.tl.drag = None;+ // the live box (#1028) already changed the selection: put back the one the drag began with+ if let Some(Drag::Marquee { before, .. }) = app.tl.drag.take() {+ app.session.state.selection = before;+ }}// ---- drag