Limit import files

This commit is contained in:
2026-01-05 16:36:43 +08:00
parent 4bd453bab0
commit 6b64abb1fa
5 changed files with 205 additions and 7 deletions
+11 -1
View File
@@ -506,8 +506,18 @@ void ProjectExplorer::ReplaceSelectedFootage()
{
Footage *footage = static_cast<Footage *>(context_menu_items_.first());
QString file = QFileDialog::getOpenFileName(this, tr("Replace Footage"));
QString file = QFileDialog::getOpenFileName(
this, tr("Replace Footage"), QString(),
Core::FootageFileDialogFilter());
if (!file.isEmpty()) {
if (!Core::IsFootageExtensionAllowed(file)) {
QMessageBox::warning(
this, tr("Unsupported media"),
tr("This file type is not allowed by the current media type "
"filter."));
return;
}
auto p = new MultiUndoCommand();
// Change filename parameter