mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 17:16:00 -05:00
Add support for "current scene" to populateSceneSelection()
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user