Fixed issue with profile not closed after change GTA folder

This commit is contained in:
Syping 2018-02-25 14:13:35 +01:00
parent 9272f0d3c1
commit 7662b374e5
3 changed files with 9 additions and 5 deletions

View file

@ -602,6 +602,10 @@ void UserInterface::on_actionSelect_GTA_Folder_triggered()
QString GTAV_Folder_Temp = QFileDialog::getExistingDirectory(this, tr("Select GTA V Folder..."), StandardPaths::documentsLocation(), QFileDialog::ShowDirsOnly);
if (QFileInfo(GTAV_Folder_Temp).exists())
{
if (profileOpen)
{
closeProfile_p();
}
GTAV_Folder = GTAV_Folder_Temp;
QDir::setCurrent(GTAV_Folder);
AppEnv::setGameFolder(GTAV_Folder);