mirror of
https://github.com/leozide/leocad
synced 2025-01-13 08:01:38 +01:00
Default save image location to the project folder.
This commit is contained in:
parent
2071d6810a
commit
9c5709feea
2 changed files with 8 additions and 2 deletions
|
@ -384,7 +384,9 @@ bool lcApplication::Initialize(int argc, char* argv[], QList<QPair<QString, bool
|
|||
else
|
||||
{
|
||||
FileName = ProjectName;
|
||||
FileName = FileName.left(FileName.length() - QFileInfo(FileName).suffix().length() - 1);
|
||||
QString Extension = QFileInfo(FileName).suffix();
|
||||
if (!Extension.isEmpty())
|
||||
FileName = FileName.left(FileName.length() - Extension.length() - 1);
|
||||
FileName += lcGetProfileString(LC_PROFILE_IMAGE_EXTENSION);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,11 @@ lcQImageDialog::lcQImageDialog(QWidget* Parent)
|
|||
mFileName = Project->GetFileName();
|
||||
|
||||
if (!mFileName.isEmpty())
|
||||
mFileName = QFileInfo(mFileName).completeBaseName();
|
||||
{
|
||||
QString Extension = QFileInfo(mFileName).suffix();
|
||||
if (!Extension.isEmpty())
|
||||
mFileName = mFileName.left(mFileName.length() - Extension.length() - 1);
|
||||
}
|
||||
else
|
||||
mFileName = QLatin1String("image");
|
||||
|
||||
|
|
Loading…
Reference in a new issue