UI: Fix studio mode transition bugs

-If the user were in the middle of a transition and clicked
the cut transition, the transitions would become borked.

-This actually disables the transition widgets, so the
user doesn't click them. Before, the disabling of the
widgets didn't work as expected. The code for enabling/disabling
them was also simplified.

-This loading of studio mode was moved in OBSInit because
the loading of transitions needs to happen first. This fixes
a bug when enabling/disabling the t-bar when the program
is first loaded. The t-bar would be disabled even if a
cut or stinger transition was not used.

-When the user would click the quick transitions, the
t-bar would be enabled even when it was not supposed
to.
This commit is contained in:
Clayton Groeneveld
2020-01-14 01:29:23 -06:00
parent 37a7805ad5
commit f7d39c12c0
3 changed files with 27 additions and 53 deletions
+9 -9
View File
@@ -1633,15 +1633,6 @@ void OBSBasic::OBSInit()
editPropertiesMode = config_get_bool(
App()->GlobalConfig(), "BasicWindow", "EditPropertiesMode");
if (!opt_studio_mode) {
SetPreviewProgramMode(config_get_bool(App()->GlobalConfig(),
"BasicWindow",
"PreviewProgramMode"));
} else {
SetPreviewProgramMode(true);
opt_studio_mode = false;
}
#define SET_VISIBILITY(name, control) \
do { \
if (config_has_user_value(App()->GlobalConfig(), \
@@ -1824,6 +1815,15 @@ void OBSBasic::OBSInit()
ui->sources->UpdateIcons();
if (!opt_studio_mode) {
SetPreviewProgramMode(config_get_bool(App()->GlobalConfig(),
"BasicWindow",
"PreviewProgramMode"));
} else {
SetPreviewProgramMode(true);
opt_studio_mode = false;
}
#if !defined(_WIN32) && !defined(__APPLE__)
delete ui->actionShowCrashLogs;
delete ui->actionUploadLastCrashLog;