mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-07-02 00:22:10 -05:00
Add support for widget caching to SceneSelectionWidget
This commit is contained in:
parent
ba3e87a761
commit
fcf57ee031
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@ public:
|
|||
bool previous = false, bool current = false,
|
||||
bool preview = false);
|
||||
EXPORT void SetScene(const SceneSelection &);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *event) override;
|
||||
|
||||
signals:
|
||||
void SceneChanged(const SceneSelection &);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user