mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-29 00:26:14 -04:00
UI: Don't update source context bar when hidden
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user