#1214 Use last imported grid file location as fallback path

This commit is contained in:
Magne Sjaastad 2017-02-14 14:59:08 +01:00
parent 4ff12a4999
commit fa0e0d32ef

View File

@ -812,16 +812,19 @@ QString RiaApplication::createAbsolutePathFromProjectRelativePath(QString projec
return projectRelativePath;
}
QString absolutePath;
if (m_project && !m_project->fileName().isEmpty())
{
QString absoluteProjectPath = QFileInfo(m_project->fileName()).absolutePath();
QDir projectDir(absoluteProjectPath);
return projectDir.absoluteFilePath(projectRelativePath);
absolutePath = QFileInfo(m_project->fileName()).absolutePath();
}
else
{
return projectRelativePath;
absolutePath = this->lastUsedDialogDirectory("BINARY_GRID");
}
QDir projectDir(absolutePath);
return projectDir.absoluteFilePath(projectRelativePath);
}