UI: Fix preview state when minimizing to tray

Makes sure preview is properly enabled/disabled when minimizing to tray,
when restoring from tray, or when starting the program up minimized to
tray
This commit is contained in:
jp9000 2020-03-19 05:31:29 -07:00
parent 89792bcae9
commit dff05d9fcc

View file

@ -7180,8 +7180,10 @@ void OBSBasic::IconActivated(QSystemTrayIcon::ActivationReason reason)
AddProjectorMenuMonitors(studioProgramProjector, this,
SLOT(OpenStudioProgramProjector()));
if (reason == QSystemTrayIcon::Trigger)
if (reason == QSystemTrayIcon::Trigger) {
EnablePreviewDisplay(previewEnabled && !isVisible());
ToggleShowHide();
}
}
void OBSBasic::SysTrayNotify(const QString &text,