As suggested by user, use file name when call save as.
This commit is contained in:
parent
5eaff85a60
commit
8cc9a221c6
|
@ -897,6 +897,11 @@ bool TMainWindow::FileSaveAs()
|
|||
usedNotExistedDir = directory.mkpath(QChar('.'));
|
||||
}
|
||||
|
||||
if (not curFile.isEmpty())
|
||||
{
|
||||
fName = StrippedName(curFile);
|
||||
}
|
||||
|
||||
QString fileName = QFileDialog::getSaveFileName(this, tr("Save as"), dir + QChar('/') + fName, filters, nullptr,
|
||||
VAbstractApplication::VApp()->NativeFileDialog());
|
||||
|
||||
|
|
|
@ -3137,8 +3137,15 @@ bool MainWindow::on_actionSaveAs_triggered()
|
|||
usedNotExistedDir = directory.mkpath(QChar('.'));
|
||||
}
|
||||
|
||||
QString newFileName = tr("pattern") + QLatin1String(".val");
|
||||
|
||||
if(not VAbstractValApplication::VApp()->GetPatternPath().isEmpty())
|
||||
{
|
||||
newFileName = StrippedName(VAbstractValApplication::VApp()->GetPatternPath());
|
||||
}
|
||||
|
||||
QString fileName = QFileDialog::getSaveFileName(this, tr("Save as"),
|
||||
dir + QLatin1String("/") + tr("pattern") + QLatin1String(".val"),
|
||||
dir + QLatin1String("/") + newFileName,
|
||||
filters, nullptr, VAbstractApplication::VApp()->NativeFileDialog());
|
||||
|
||||
auto RemoveTempDir = qScopeGuard([usedNotExistedDir, dir]()
|
||||
|
|
Loading…
Reference in New Issue
Block a user