Merge pull request #12665 from german77/proof

service: acc: Only save profiles when profiles have changed
This commit is contained in:
liamwhite
2024-01-15 13:52:33 -05:00
committed by GitHub
3 changed files with 21 additions and 3 deletions

View File

@ -205,6 +205,7 @@ void ConfigureProfileManager::AddUser() {
const auto uuid = Common::UUID::MakeRandom();
profile_manager.CreateNewUser(uuid, username.toStdString());
profile_manager.WriteUserSaveFile();
item_model->appendRow(new QStandardItem{GetIcon(uuid), FormatUserEntryText(username, uuid)});
}
@ -228,6 +229,7 @@ void ConfigureProfileManager::RenameUser() {
std::copy(username_std.begin(), username_std.end(), profile.username.begin());
profile_manager.SetProfileBase(*uuid, profile);
profile_manager.WriteUserSaveFile();
item_model->setItem(
user, 0,
@ -256,6 +258,8 @@ void ConfigureProfileManager::DeleteUser(const Common::UUID& uuid) {
return;
}
profile_manager.WriteUserSaveFile();
item_model->removeRows(tree_view->currentIndex().row(), 1);
tree_view->clearSelection();