Default save image location to the project folder.

This commit is contained in:
Leonardo Zide 2017-11-24 11:53:04 -08:00
parent 2071d6810a
commit 9c5709feea
2 changed files with 8 additions and 2 deletions

View file

@ -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);
}

View file

@ -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");