UI: Set correct window title for fullscreen projector

Before this change, opening up a fullscreen projector would have the
wrong window title (Windowed Projector). This was because the call to
update the window title was called before a monitor is set, and the
title is determined by whether a monitor is set.

This change moves the update title call to after the geometry or monitor
gets set, ensuring the window title is correct.
This commit is contained in:
VodBox 2020-03-22 22:59:27 +13:00
parent f8391dae31
commit 62c7eb489d

View file

@ -25,13 +25,14 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
type = type_;
setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png")));
UpdateProjectorTitle(QT_UTF8(obs_source_get_name(source)));
if (monitor == -1)
resize(480, 270);
else
SetMonitor(monitor);
UpdateProjectorTitle(QT_UTF8(obs_source_get_name(source)));
QAction *action = new QAction(this);
action->setShortcut(Qt::Key_Escape);
addAction(action);