UI: Clear context bar on scene collection change
Fixes a bug where the source toolbar would show the previously selected source from the prior scene collection when changing to a new scene collection
This commit is contained in:
parent
d310f1532b
commit
68dcee824e
2 changed files with 10 additions and 3 deletions
|
|
@ -906,6 +906,7 @@ void OBSBasic::Load(const char *file)
|
|||
|
||||
ClearSceneData();
|
||||
InitDefaultTransitions();
|
||||
ClearContextBar();
|
||||
|
||||
obs_data_t *modulesObj = obs_data_get_obj(data, "modules");
|
||||
if (api)
|
||||
|
|
@ -2885,15 +2886,20 @@ void OBSBasic::RenameSources(OBSSource source, QString newName,
|
|||
UpdateContextBar();
|
||||
}
|
||||
|
||||
void OBSBasic::UpdateContextBar()
|
||||
void OBSBasic::ClearContextBar()
|
||||
{
|
||||
OBSSceneItem item = GetCurrentSceneItem();
|
||||
|
||||
QLayoutItem *la = ui->emptySpace->layout()->itemAt(0);
|
||||
if (la) {
|
||||
delete la->widget();
|
||||
ui->emptySpace->layout()->removeItem(la);
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::UpdateContextBar()
|
||||
{
|
||||
OBSSceneItem item = GetCurrentSceneItem();
|
||||
|
||||
ClearContextBar();
|
||||
|
||||
if (item) {
|
||||
obs_source_t *source = obs_sceneitem_get_source(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue