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 collectionmaster
parent
d310f1532b
commit
68dcee824e
|
@ -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);
|
||||
|
|
|
@ -1009,6 +1009,7 @@ public slots:
|
|||
bool RecordingActive();
|
||||
bool ReplayBufferActive();
|
||||
|
||||
void ClearContextBar();
|
||||
void UpdateContextBar();
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue