Merge pull request #6727 from spycrab/qt_fix_prof

Qt/MappingWindow: Fix saving to incomplete Profile directory
This commit is contained in:
Pierre Bourdon 2018-05-02 13:05:09 +02:00 committed by GitHub
commit e89ac769fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -199,8 +199,9 @@ void MappingWindow::OnLoadProfilePressed()
void MappingWindow::OnSaveProfilePressed()
{
const QString profile_name = m_profiles_combo->currentText();
const std::string profile_path =
File::GetUserPath(D_CONFIG_IDX) + PROFILES_DIR + profile_name.toStdString() + ".ini";
const std::string profile_path = File::GetUserPath(D_CONFIG_IDX) + PROFILES_DIR +
m_config->GetProfileName() + "/" + profile_name.toStdString() +
".ini";
if (profile_name.isEmpty())
return;