UI: Add events for renaming profiles/collections

The events make it more clear when profiles or scene
collections are renamed.
This commit is contained in:
cg2121
2022-02-24 22:56:20 -06:00
committed by Jim
parent 4afafaac6d
commit 748cf32a43
4 changed files with 16 additions and 17 deletions

View File

@@ -517,9 +517,6 @@ void OBSBasic::on_actionDupProfile_triggered()
void OBSBasic::on_actionRenameProfile_triggered()
{
if (api)
api->on_event(OBS_FRONTEND_EVENT_PROFILE_CHANGING);
std::string curDir =
config_get_string(App()->GlobalConfig(), "Basic", "ProfileDir");
std::string curName =
@@ -534,10 +531,8 @@ void OBSBasic::on_actionRenameProfile_triggered()
RefreshProfiles();
}
if (api) {
api->on_event(OBS_FRONTEND_EVENT_PROFILE_LIST_CHANGED);
api->on_event(OBS_FRONTEND_EVENT_PROFILE_CHANGED);
}
if (api)
api->on_event(OBS_FRONTEND_EVENT_PROFILE_RENAMED);
}
void OBSBasic::on_actionRemoveProfile_triggered(bool skipConfirmation)