diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-06-28 21:58:16 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-06-28 23:32:17 +0200 |
commit | b91b76df4fe27d781bd95ddb89b78ff54df57029 (patch) | |
tree | abd3de5c02b036ec936a70599e496ba1d45d7849 /src/yuzu/configuration/configure_profile_manager.cpp | |
parent | configuration: Defer to common/settings for per-game settings defaults (diff) | |
download | yuzu-b91b76df4fe27d781bd95ddb89b78ff54df57029.tar yuzu-b91b76df4fe27d781bd95ddb89b78ff54df57029.tar.gz yuzu-b91b76df4fe27d781bd95ddb89b78ff54df57029.tar.bz2 yuzu-b91b76df4fe27d781bd95ddb89b78ff54df57029.tar.lz yuzu-b91b76df4fe27d781bd95ddb89b78ff54df57029.tar.xz yuzu-b91b76df4fe27d781bd95ddb89b78ff54df57029.tar.zst yuzu-b91b76df4fe27d781bd95ddb89b78ff54df57029.zip |
Diffstat (limited to 'src/yuzu/configuration/configure_profile_manager.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_profile_manager.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/yuzu/configuration/configure_profile_manager.cpp b/src/yuzu/configuration/configure_profile_manager.cpp index f5881e58d..ac849b01d 100644 --- a/src/yuzu/configuration/configure_profile_manager.cpp +++ b/src/yuzu/configuration/configure_profile_manager.cpp @@ -166,7 +166,7 @@ void ConfigureProfileManager::PopulateUserList() { void ConfigureProfileManager::UpdateCurrentUser() { ui->pm_add->setEnabled(profile_manager->GetUserCount() < Service::Account::MAX_USERS); - const auto& current_user = profile_manager->GetUser(Settings::values.current_user); + const auto& current_user = profile_manager->GetUser(Settings::values.current_user.GetValue()); ASSERT(current_user); const auto username = GetAccountUsername(*profile_manager, *current_user); @@ -245,15 +245,18 @@ void ConfigureProfileManager::DeleteUser() { this, tr("Confirm Delete"), tr("You are about to delete user with name \"%1\". Are you sure?").arg(username)); - if (confirm == QMessageBox::No) + if (confirm == QMessageBox::No) { return; + } - if (Settings::values.current_user == tree_view->currentIndex().row()) + if (Settings::values.current_user.GetValue() == tree_view->currentIndex().row()) { Settings::values.current_user = 0; + } UpdateCurrentUser(); - if (!profile_manager->RemoveUser(*uuid)) + if (!profile_manager->RemoveUser(*uuid)) { return; + } item_model->removeRows(tree_view->currentIndex().row(), 1); tree_view->clearSelection(); |