This commit is contained in:
Kuzma30
2024-05-27 14:19:12 +00:00
committed by sliptonic
parent 65de6c96e8
commit 751aed1813

View File

@@ -1209,8 +1209,12 @@ bool Document::saveAs()
getMainWindow()->showMessage(QObject::tr("Save document under new filename..."));
QString exe = qApp->applicationName();
QString name = QString::fromUtf8(getDocument()->FileName.getValue());
if(name.isEmpty()){
name = QString::fromUtf8(getDocument()->Label.getValue());
}
QString fn = FileDialog::getSaveFileName(getMainWindow(), QObject::tr("Save %1 Document").arg(exe),
QString::fromUtf8(getDocument()->Label.getValue()),
name,
QString::fromLatin1("%1 %2 (*.FCStd)").arg(exe, QObject::tr("Document")));
if (!fn.isEmpty()) {