only show export dialog if the sequence is not empty

This commit is contained in:
itsmattkc
2019-12-19 15:53:56 +11:00
parent b308f753b3
commit c5e16ed805
+9 -2
View File
@@ -232,8 +232,15 @@ void Core::DialogExportShow()
ViewerPanel* latest_viewer = olive::panel_manager->MostRecentlyFocused<ViewerPanel>();
if (latest_viewer && latest_viewer->GetConnectedViewer()) {
ExportDialog ed(latest_viewer->GetConnectedViewer(), main_window_);
ed.exec();
if (latest_viewer->GetConnectedViewer()->Length() == 0) {
QMessageBox::critical(main_window_,
tr("Error"),
tr("This Sequence is empty. There is nothing to export."),
QMessageBox::Ok);
} else {
ExportDialog ed(latest_viewer->GetConnectedViewer(), main_window_);
ed.exec();
}
}
}