Settings: Open file dialogs at user path

When opening a file dialog to set the location of a custom path, use the
corresponding user path as the starting location instead of the current
custom path.

When no custom path was set the dialog would be opened with a blank path
which causes Windows (not sure about other platforms) to open the dialog
at the same location where the last dialog was closed, or at the current
working directory if no previous dialog had been opened.

If a nonempty custom path has been set then it has also set the
corresponding user path, so the behavior in that case is unchanged.
This commit is contained in:
Dentomologist 2025-09-01 14:34:38 -07:00
commit e44c99cb59
3 changed files with 7 additions and 6 deletions

View file

@ -516,7 +516,7 @@ void WiiPane::BrowseSDSyncFolder()
{
QString file = QDir::toNativeSeparators(DolphinFileDialog::getExistingDirectory(
this, tr("Select a Folder to Sync with the SD Card Image"),
QString::fromStdString(Config::Get(Config::MAIN_WII_SD_CARD_SYNC_FOLDER_PATH))));
QString::fromStdString(File::GetUserPath(D_WIISDCARDSYNCFOLDER_IDX))));
if (!file.isEmpty())
SetSDSyncFolder(file);
}