project: auto-select imported files

This commit is contained in:
itsmattkc
2022-07-26 11:39:35 -07:00
parent f6dc3c7fcc
commit 15a67bc12a
8 changed files with 50 additions and 5 deletions
+20
View File
@@ -410,6 +410,16 @@ void MainWindow::SetApplicationProgressValue(int value)
#endif
}
void MainWindow::SelectFootage(const QVector<Footage *> &e)
{
for (ProjectPanel *p : project_panels_) {
SelectFootageForProjectPanel(e, p);
}
for (ProjectPanel *p : folder_panels_) {
SelectFootageForProjectPanel(e, p);
}
}
void MainWindow::closeEvent(QCloseEvent *e)
{
// Try to close all projects (this will return false if the user chooses not to close)
@@ -759,6 +769,16 @@ void MainWindow::UpdateNodePanelContextFromTimelinePanel(TimelinePanel *panel)
param_panel_->SetContexts(context);
}
void MainWindow::SelectFootageForProjectPanel(const QVector<Footage *> &e, ProjectPanel *p)
{
p->DeselectAll();
for (Footage *f : e) {
if (p->get_root()->HasChildRecursive(f)) {
p->SelectItem(f, false);
}
}
}
void MainWindow::FocusedPanelChanged(PanelWidget *panel)
{
// Update audio monitor panel