exportdialog: use sequence name and project directory to auto-select export
filename
This commit is contained in:
@@ -414,8 +414,18 @@ void ExportDialog::LoadPresets()
|
|||||||
|
|
||||||
void ExportDialog::SetDefaultFilename()
|
void ExportDialog::SetDefaultFilename()
|
||||||
{
|
{
|
||||||
QString doc_location = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
Sequence* s = static_cast<Sequence*>(viewer_node_->parent());
|
||||||
QString file_location = QDir(doc_location).filePath("export");
|
Project* p = s->project();
|
||||||
|
|
||||||
|
QDir doc_location;
|
||||||
|
|
||||||
|
if (p->filename().isEmpty()) {
|
||||||
|
doc_location.setPath(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
|
||||||
|
} else {
|
||||||
|
doc_location = QFileInfo(p->filename()).dir();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString file_location = doc_location.filePath(s->name());
|
||||||
filename_edit_->setText(file_location);
|
filename_edit_->setText(file_location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user