mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-07-18 17:04:28 -05:00
Add support for "current scene" to populateSceneSelection()
This commit is contained in:
parent
7cfa956b80
commit
0bc15b4c2d
|
|
@ -64,6 +64,7 @@ void populateMediaSelection(QComboBox *sel, bool addSelect = true);
|
|||
void populateProcessSelection(QComboBox *sel, bool addSelect = true);
|
||||
void populateSourceSelection(QComboBox *list, bool addSelect = true);
|
||||
void populateSceneSelection(QComboBox *sel, bool addPrevious = false,
|
||||
bool addCurrent = false, bool addAny = false,
|
||||
bool addSceneGroup = false,
|
||||
std::deque<SceneGroup> *sceneGroups = nullptr,
|
||||
bool addSelect = true, std::string selectText = "",
|
||||
|
|
|
|||
|
|
@ -208,8 +208,8 @@ SwitchWidget::SwitchWidget(QWidget *parent, SceneSwitcherEntry *s,
|
|||
SIGNAL(SceneGroupRenamed(const QString &, const QString &)),
|
||||
this, SLOT(SceneGroupRename(const QString &, const QString &)));
|
||||
|
||||
populateSceneSelection(scenes, usePreviousScene, addSceneGroup,
|
||||
&switcher->sceneGroups);
|
||||
populateSceneSelection(scenes, usePreviousScene, false, false,
|
||||
addSceneGroup, &switcher->sceneGroups);
|
||||
populateTransitionSelection(transitions, addCurrentTransition);
|
||||
|
||||
switchData = s;
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ ScreenRegionWidget::ScreenRegionWidget(QWidget *parent, ScreenRegionSwitch *s)
|
|||
SLOT(MaxYChanged(int)));
|
||||
|
||||
populateSceneSelection(
|
||||
excludeScenes, false, false, nullptr, true,
|
||||
excludeScenes, false, false, false, false, nullptr, true,
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.screenRegionTab.excludeScenes.None"),
|
||||
true);
|
||||
|
|
|
|||
|
|
@ -538,8 +538,8 @@ void populateProcessSelection(QComboBox *sel, bool addSelect)
|
|||
sel->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void populateSceneSelection(QComboBox *sel, bool addPrevious,
|
||||
bool addSceneGroup,
|
||||
void populateSceneSelection(QComboBox *sel, bool addPrevious, bool addCurrent,
|
||||
bool addAny, bool addSceneGroup,
|
||||
std::deque<SceneGroup> *sceneGroups, bool addSelect,
|
||||
std::string selectText, bool selectable)
|
||||
{
|
||||
|
|
@ -551,11 +551,6 @@ void populateSceneSelection(QComboBox *sel, bool addPrevious,
|
|||
temp++;
|
||||
}
|
||||
|
||||
if (addPrevious) {
|
||||
sel->addItem(obs_module_text(
|
||||
"AdvSceneSwitcher.selectPreviousScene"));
|
||||
}
|
||||
|
||||
if (addSceneGroup && sceneGroups) {
|
||||
for (auto &sg : *sceneGroups) {
|
||||
sel->addItem(QString::fromStdString(sg.name));
|
||||
|
|
@ -576,6 +571,21 @@ void populateSceneSelection(QComboBox *sel, bool addPrevious,
|
|||
}
|
||||
}
|
||||
sel->setCurrentIndex(0);
|
||||
|
||||
if (addPrevious) {
|
||||
sel->insertItem(
|
||||
1, obs_module_text(
|
||||
"AdvSceneSwitcher.selectPreviousScene"));
|
||||
}
|
||||
if (addCurrent) {
|
||||
sel->insertItem(
|
||||
1,
|
||||
obs_module_text("AdvSceneSwitcher.selectCurrentScene"));
|
||||
}
|
||||
if (addAny) {
|
||||
sel->insertItem(
|
||||
1, obs_module_text("AdvSceneSwitcher.selectAnyScene"));
|
||||
}
|
||||
}
|
||||
|
||||
static inline void hasFilterEnum(obs_source_t *, obs_source_t *filter,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user