mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 12:34:37 +03:00
feat: require restart after profile change
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user