Add support for widget caching to SceneSelectionWidget

This commit is contained in:
WarmUpTill
2025-05-21 10:35:26 +02:00
committed by WarmUpTill
parent ba3e87a761
commit fcf57ee031
2 changed files with 13 additions and 4 deletions

View File

@@ -409,6 +409,13 @@ void SceneSelectionWidget::SetScene(const SceneSelection &s)
_currentSelection = s;
}
void SceneSelectionWidget::showEvent(QShowEvent *event)
{
FilterComboBox::showEvent(event);
const QSignalBlocker b(this);
Reset();
}
bool SceneSelectionWidget::IsCurrentSceneSelected(const QString &name)
{
return name == QString::fromStdString((obs_module_text(
@@ -435,9 +442,8 @@ void SceneSelectionWidget::SelectionChanged(int)
void SceneSelectionWidget::ItemAdd(const QString &)
{
blockSignals(true);
const QSignalBlocker b(this);
Reset();
blockSignals(false);
}
bool SceneSelectionWidget::NameUsed(const QString &name)
@@ -462,9 +468,8 @@ void SceneSelectionWidget::ItemRemove(const QString &name)
void SceneSelectionWidget::ItemRename(const QString &, const QString &)
{
blockSignals(true);
const QSignalBlocker b(this);
Reset();
blockSignals(false);
}
} // namespace advss