mirror of
https://github.com/leozide/leocad
synced 2024-12-27 21:58:37 +01:00
This commit is contained in:
parent
98f2679cb2
commit
b99724c7b0
1 changed files with 0 additions and 10 deletions
|
@ -2495,20 +2495,10 @@ bool lcMainWindow::SaveProject(const QString& FileName)
|
|||
QString SaveFileName = FileName;
|
||||
Project* Project = lcGetActiveProject();
|
||||
|
||||
if (!SaveFileName.isEmpty() && Project->GetModels().GetSize() > 1 && QFileInfo(SaveFileName).suffix().toLower() != QLatin1String("mpd"))
|
||||
SaveFileName.clear();
|
||||
|
||||
if (SaveFileName.isEmpty())
|
||||
{
|
||||
SaveFileName = Project->GetFileName();
|
||||
|
||||
if (Project->GetModels().GetSize() > 1 && QFileInfo(SaveFileName).suffix().toLower() != QLatin1String("mpd"))
|
||||
{
|
||||
int SuffixLength = QFileInfo(SaveFileName).suffix().length();
|
||||
if (SuffixLength)
|
||||
SaveFileName = SaveFileName.left(SaveFileName.length() - SuffixLength - 1);
|
||||
}
|
||||
|
||||
if (SaveFileName.isEmpty())
|
||||
SaveFileName = QFileInfo(QDir(lcGetProfileString(LC_PROFILE_PROJECTS_PATH)), Project->GetTitle()).absoluteFilePath();
|
||||
|
||||
|
|
Loading…
Reference in a new issue