FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust
Merge pull request #652 from vangel76/fix-456-project-select-all
Brandon Thomas66a4208a6b8c
diff --cc crates/ui-egui/src/lib.rsindex 3ffb5cf71,727e80f73..727b123c4--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@@ -1361,19 -1301,19 +1361,27 @@@ impl FilmcraftApp});for mut id in fire {// Select All / Deselect All act on the Project panel's items when it has focus (#168).- if self.ui.focused == PanelKind::Project && matches!(id.as_str(), "edit.selectAll" | "edit.deselectAll") {- id = id.replacen("edit.", "project.", 1);+ // Select All takes only what the shown bin lists, not the whole project (#456).+ if self.ui.focused == PanelKind::Project && id == "edit.selectAll" {+ let (cmd, params) = panels::project::select_all_command(self);+ if let Err(e) = menus::invoke(self, ctx, &cmd, params) {+ self.ui.status = e;+ }+ continue;+ }+ if self.ui.focused == PanelKind::Project && id == "edit.deselectAll" {+ id = "project.deselectAll".into();}+ // Clear in the Project panel removes the selected bin when no item is selected (#587).+ let clear = if self.ui.focused == PanelKind::Project && id == "project.delete" {+ crate::panels::project_views::clear_params(&self.session.state.project_selection, self.ui.project_panel.selected_bin)+ } else {+ None+ };// Mark In/Out in the Source monitor when it has focus.- let params = if self.ui.focused == PanelKind::Source+ let params = if let Some(p) = clear {+ p+ } else if self.ui.focused == PanelKind::Source&& (matches!(id.as_str(), "markers.markIn" | "markers.markOut" | "markers.clearInOut")|| id.starts_with("markers.markSplit")|| id.starts_with("markers.goToSplit"))