UI: Fix enumeration of scene collections on first run

When running the program for the first time, no scene collections will
show up in the scene collection menu.  This changes it to forcibly save
the first scene collection on the first run of the program, and then
re-enumerates the list to ensure it's listed.
This commit is contained in:
jp9000 2017-05-17 23:29:02 -07:00
parent ee6ca246fe
commit 12236d73f4

View File

@ -221,9 +221,22 @@ void OBSBasic::RefreshSceneCollections()
EnumSceneCollections(addCollection);
/* force saving of first scene collection on first run, otherwise
* no scene collections will show up */
if (!count) {
long prevDisableVal = disableSaving;
disableSaving = 0;
SaveProjectNow();
disableSaving = prevDisableVal;
EnumSceneCollections(addCollection);
}
ui->actionRemoveSceneCollection->setEnabled(count > 1);
OBSBasic *main = reinterpret_cast<OBSBasic*>(App()->GetMainWindow());
main->OpenSavedProjectors();
main->ui->actionPasteFilters->setEnabled(false);
main->ui->actionPasteRef->setEnabled(false);