mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Don't update source context bar when hidden
This commit is contained in:
parent
737481c09e
commit
9a64adb4d1
|
@ -360,8 +360,6 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||
|
||||
QPoint curPos;
|
||||
|
||||
UpdateContextBar();
|
||||
|
||||
//restore parent window geometry
|
||||
const char *geometry = config_get_string(App()->GlobalConfig(),
|
||||
"BasicWindow", "geometry");
|
||||
|
@ -1755,6 +1753,8 @@ void OBSBasic::OBSInit()
|
|||
"ShowContextToolbars");
|
||||
ui->toggleContextBar->setChecked(visible);
|
||||
ui->contextContainer->setVisible(visible);
|
||||
if (visible)
|
||||
UpdateContextBar(true);
|
||||
} else {
|
||||
ui->toggleContextBar->setChecked(true);
|
||||
ui->contextContainer->setVisible(true);
|
||||
|
@ -2929,8 +2929,11 @@ static bool is_network_media_source(obs_source_t *source, const char *id)
|
|||
return !is_local_file;
|
||||
}
|
||||
|
||||
void OBSBasic::UpdateContextBar()
|
||||
void OBSBasic::UpdateContextBar(bool force)
|
||||
{
|
||||
if (!ui->contextContainer->isVisible() && !force)
|
||||
return;
|
||||
|
||||
OBSSceneItem item = GetCurrentSceneItem();
|
||||
|
||||
ClearContextBar();
|
||||
|
@ -7362,6 +7365,7 @@ void OBSBasic::on_toggleContextBar_toggled(bool visible)
|
|||
config_set_bool(App()->GlobalConfig(), "BasicWindow",
|
||||
"ShowContextToolbars", visible);
|
||||
this->ui->contextContainer->setVisible(visible);
|
||||
UpdateContextBar(true);
|
||||
}
|
||||
|
||||
void OBSBasic::on_toggleStatusBar_toggled(bool visible)
|
||||
|
|
|
@ -1023,7 +1023,7 @@ public slots:
|
|||
bool ReplayBufferActive();
|
||||
|
||||
void ClearContextBar();
|
||||
void UpdateContextBar();
|
||||
void UpdateContextBar(bool force = false);
|
||||
|
||||
public:
|
||||
explicit OBSBasic(QWidget *parent = 0);
|
||||
|
|
Loading…
Reference in a new issue