UI: Add frontend API to defer saving

Allows the ability to perform multiple actions that would normally save,
and defer the save until all of those actions are complete.

Closes obsproject/obs-studio#1231
This commit is contained in:
Ilya M
2018-02-04 23:36:56 +02:00
committed by jp9000
parent 0dc9151dbd
commit 439b9e4d15
6 changed files with 43 additions and 1 deletions

View File

@@ -329,6 +329,16 @@ struct OBSStudioAPI : obs_frontend_callbacks {
main->SaveProject();
}
void obs_frontend_defer_save_begin(void) override
{
QMetaObject::invokeMethod(main, "DeferSaveBegin");
}
void obs_frontend_defer_save_end(void) override
{
QMetaObject::invokeMethod(main, "DeferSaveEnd");
}
void obs_frontend_add_save_callback(obs_frontend_save_cb callback,
void *private_data) override
{