feat: require restart after profile change

This commit is contained in:
arm64v8a
2022-11-30 09:55:41 +09:00
parent a973c3f4ad
commit 163fe56947
6 changed files with 22 additions and 3 deletions

View File

@@ -334,16 +334,20 @@ void DialogEditProfile::accept() {
*((QString *) custom_item->ptr) = CACHE.custom;
}
// finish
QStringList msg = {"accept"};
if (newEnt) {
auto ok = NekoRay::profileManager->AddProfile(ent);
if (!ok) {
MessageBoxWarning("???", "id exists");
}
} else {
ent->Save();
auto changed = ent->Save();
if (changed && NekoRay::dataStore->started_id == ent->id) msg << "restart";
}
MW_dialog_message(Dialog_DialogEditProfile, "accept");
MW_dialog_message(Dialog_DialogEditProfile, msg.join(","));
QDialog::accept();
}