Fix Windows file dialog for loading Viatom files.

This commit is contained in:
sawinglogz 2020-02-16 21:02:30 -05:00
parent b96f22bcd9
commit 498451df4a

View File

@ -2460,6 +2460,10 @@ void MainWindow::on_actionImport_Viatom_Data_triggered()
w.setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
w.setOption(QFileDialog::ShowDirsOnly, false);
w.setNameFilters(viatom.getNameFilter());
#if defined(Q_OS_WIN)
// Windows can't handle this name filter.
w.setOption(QFileDialog::DontUseNativeDialog, true);
#endif
if (w.exec() == QFileDialog::Accepted) {
QString filename = w.selectedFiles()[0];