mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Rework SourceSelectionWidget to support widget caching
This commit is contained in:
parent
3dd3f576c3
commit
ba3e87a761
|
|
@ -164,7 +164,7 @@ void SourceSelectionWidget::PopulateSelection()
|
|||
}
|
||||
_variablesEndIdx = count();
|
||||
|
||||
AddSelectionGroup(this, _sourceNames);
|
||||
AddSelectionGroup(this, _populateSourcesCallback());
|
||||
_sourcesEndIdx = count();
|
||||
|
||||
// Remove last separator
|
||||
|
|
@ -172,13 +172,13 @@ void SourceSelectionWidget::PopulateSelection()
|
|||
setCurrentIndex(-1);
|
||||
}
|
||||
|
||||
SourceSelectionWidget::SourceSelectionWidget(QWidget *parent,
|
||||
const QStringList &sourceNames,
|
||||
bool addVariables)
|
||||
SourceSelectionWidget::SourceSelectionWidget(
|
||||
QWidget *parent, const std::function<QStringList()> &populate,
|
||||
bool addVariables)
|
||||
: FilterComboBox(parent,
|
||||
obs_module_text("AdvSceneSwitcher.selectSource")),
|
||||
_addVariables(addVariables),
|
||||
_sourceNames(sourceNames)
|
||||
_populateSourcesCallback(populate)
|
||||
{
|
||||
setDuplicatesEnabled(true);
|
||||
PopulateSelection();
|
||||
|
|
@ -200,6 +200,11 @@ SourceSelectionWidget::SourceSelectionWidget(QWidget *parent,
|
|||
|
||||
void SourceSelectionWidget::SetSource(const SourceSelection &s)
|
||||
{
|
||||
{
|
||||
const QSignalBlocker b(this);
|
||||
PopulateSelection();
|
||||
}
|
||||
|
||||
int idx = -1;
|
||||
|
||||
switch (s.GetType()) {
|
||||
|
|
@ -229,23 +234,23 @@ void SourceSelectionWidget::SetSource(const SourceSelection &s)
|
|||
_currentSelection = s;
|
||||
}
|
||||
|
||||
void SourceSelectionWidget::SetSourceNameList(const QStringList &list)
|
||||
{
|
||||
_sourceNames = list;
|
||||
Reset();
|
||||
}
|
||||
|
||||
void SourceSelectionWidget::SelectionChanged(int)
|
||||
{
|
||||
_currentSelection = CurrentSelection();
|
||||
emit SourceChanged(_currentSelection);
|
||||
}
|
||||
|
||||
void SourceSelectionWidget::showEvent(QShowEvent *event)
|
||||
{
|
||||
FilterComboBox::showEvent(event);
|
||||
const QSignalBlocker b(this);
|
||||
Reset();
|
||||
}
|
||||
|
||||
void SourceSelectionWidget::ItemAdd(const QString &)
|
||||
{
|
||||
blockSignals(true);
|
||||
const QSignalBlocker b(this);
|
||||
Reset();
|
||||
blockSignals(false);
|
||||
}
|
||||
|
||||
bool SourceSelectionWidget::NameUsed(const QString &name)
|
||||
|
|
@ -265,9 +270,8 @@ void SourceSelectionWidget::ItemRemove(const QString &name)
|
|||
|
||||
void SourceSelectionWidget::ItemRename(const QString &, const QString &)
|
||||
{
|
||||
blockSignals(true);
|
||||
const QSignalBlocker b(this);
|
||||
Reset();
|
||||
blockSignals(false);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -39,13 +39,16 @@ class ADVSS_EXPORT SourceSelectionWidget : public FilterComboBox {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SourceSelectionWidget(QWidget *parent, const QStringList &sourceNames,
|
||||
SourceSelectionWidget(QWidget *parent,
|
||||
const std::function<QStringList()> &populate,
|
||||
bool addVariables = true);
|
||||
void SetSource(const SourceSelection &);
|
||||
void SetSourceNameList(const QStringList &);
|
||||
signals:
|
||||
void SourceChanged(const SourceSelection &);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void SelectionChanged(int);
|
||||
void ItemAdd(const QString &name);
|
||||
|
|
@ -59,7 +62,7 @@ private:
|
|||
bool NameUsed(const QString &name);
|
||||
|
||||
bool _addVariables;
|
||||
QStringList _sourceNames;
|
||||
std::function<QStringList()> _populateSourcesCallback;
|
||||
SourceSelection _currentSelection;
|
||||
|
||||
// Order of entries
|
||||
|
|
|
|||
|
|
@ -421,10 +421,17 @@ static inline void populateFadeTypeSelection(QComboBox *list)
|
|||
}
|
||||
}
|
||||
|
||||
static QStringList getAudioSourcesList()
|
||||
{
|
||||
auto sources = GetAudioSourceNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroActionAudioEdit::MacroActionAudioEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroActionAudio> entryData)
|
||||
: QWidget(parent),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getAudioSourcesList, true)),
|
||||
_actions(new QComboBox),
|
||||
_fadeTypes(new QComboBox),
|
||||
_syncOffset(new VariableSpinBox),
|
||||
|
|
@ -468,9 +475,6 @@ MacroActionAudioEdit::MacroActionAudioEdit(
|
|||
_rate->setSuffix("%");
|
||||
|
||||
populateActionSelection(_actions);
|
||||
auto sources = GetAudioSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
populateFadeTypeSelection(_fadeTypes);
|
||||
PopulateMonitorTypeSelection(_monitorTypes);
|
||||
|
||||
|
|
|
|||
|
|
@ -199,10 +199,17 @@ static inline void populateSettingsInputMethods(QComboBox *list)
|
|||
}
|
||||
}
|
||||
|
||||
static QStringList getFilterSourcesList()
|
||||
{
|
||||
auto sources = GetSourcesWithFilterNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroActionFilterEdit::MacroActionFilterEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroActionFilter> entryData)
|
||||
: QWidget(parent),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getFilterSourcesList, true)),
|
||||
_filters(new FilterSelectionWidget(this, _sources, true)),
|
||||
_actions(new QComboBox()),
|
||||
_getSettings(new QPushButton(obs_module_text(
|
||||
|
|
@ -220,9 +227,6 @@ MacroActionFilterEdit::MacroActionFilterEdit(
|
|||
_filters->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
|
||||
populateActionSelection(_actions);
|
||||
auto sources = GetSourcesWithFilterNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
_refreshSettingSelection->setToolTip(obs_module_text(
|
||||
"AdvSceneSwitcher.action.filter.refresh.tooltip"));
|
||||
|
||||
|
|
|
|||
|
|
@ -219,6 +219,13 @@ static inline void populateSelectionTypeSelection(QComboBox *list)
|
|||
}
|
||||
}
|
||||
|
||||
static QStringList getMediaSourcesList()
|
||||
{
|
||||
auto sources = GetMediaSourceNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroActionMediaEdit::MacroActionMediaEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroActionMedia> entryData)
|
||||
: QWidget(parent),
|
||||
|
|
@ -229,15 +236,12 @@ MacroActionMediaEdit::MacroActionMediaEdit(
|
|||
0, 100,
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.action.media.seek.percentage.label"))),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getMediaSourcesList, true)),
|
||||
_sceneItems(new SceneItemSelectionWidget(parent, false)),
|
||||
_scenes(new SceneSelectionWidget(this, true, false, true, true, true))
|
||||
{
|
||||
populateActionSelection(_actions);
|
||||
populateSelectionTypeSelection(_selectionTypes);
|
||||
auto sources = GetMediaSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
QWidget::connect(_actions, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(ActionChanged(int)));
|
||||
|
|
|
|||
|
|
@ -230,6 +230,13 @@ static void populateWindowTypes(QComboBox *list)
|
|||
"AdvSceneSwitcher.action.projector.fullscreen"));
|
||||
}
|
||||
|
||||
static QStringList getSourcesList()
|
||||
{
|
||||
auto sources = GetSourceNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroActionProjectorEdit::MacroActionProjectorEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroActionProjector> entryData)
|
||||
: QWidget(parent),
|
||||
|
|
@ -238,7 +245,7 @@ MacroActionProjectorEdit::MacroActionProjectorEdit(
|
|||
_windowTypes(new QComboBox()),
|
||||
_scenes(new SceneSelectionWidget(window(), true, false, true, true,
|
||||
true)),
|
||||
_sources(new SourceSelectionWidget(window(), QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(window(), getSourcesList, true)),
|
||||
_monitors(new QComboBox()),
|
||||
_projectorWindowName(new VariableLineEdit(this)),
|
||||
_regex(new RegexConfigWidget(this)),
|
||||
|
|
@ -247,9 +254,7 @@ MacroActionProjectorEdit::MacroActionProjectorEdit(
|
|||
populateActionSelection(_actions);
|
||||
populateWindowTypes(_windowTypes);
|
||||
populateSelectionTypes(_types);
|
||||
auto sources = GetSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
_monitors->addItems(GetMonitorNames());
|
||||
_monitors->setPlaceholderText(
|
||||
obs_module_text("AdvSceneSwitcher.selectDisplay"));
|
||||
|
|
|
|||
|
|
@ -193,12 +193,19 @@ static void populateTargetTypeSelection(QComboBox *list)
|
|||
list->addItem(obs_module_text("AdvSceneSwitcher.OBSVideoOutput"));
|
||||
}
|
||||
|
||||
static QStringList getVideoSourcesList()
|
||||
{
|
||||
auto sources = GetVideoSourceNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroActionScreenshotEdit::MacroActionScreenshotEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroActionScreenshot> entryData)
|
||||
: QWidget(parent),
|
||||
_scenes(new SceneSelectionWidget(this, true, false, true, true,
|
||||
true)),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getVideoSourcesList, true)),
|
||||
_saveType(new QComboBox()),
|
||||
_targetType(new QComboBox()),
|
||||
_savePath(new FileSelection(FileSelection::Type::WRITE, this)),
|
||||
|
|
@ -206,9 +213,6 @@ MacroActionScreenshotEdit::MacroActionScreenshotEdit(
|
|||
{
|
||||
setToolTip(obs_module_text(
|
||||
"AdvSceneSwitcher.action.screenshot.blackscreenNote"));
|
||||
auto sources = GetVideoSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
populateSaveTypeSelection(_saveType);
|
||||
populateTargetTypeSelection(_targetType);
|
||||
|
|
|
|||
|
|
@ -274,10 +274,17 @@ static inline void populateModeSelection(QComboBox *list,
|
|||
}
|
||||
}
|
||||
|
||||
static QStringList getSourcesList()
|
||||
{
|
||||
auto sources = GetSourceNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroActionSourceEdit::MacroActionSourceEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroActionSource> entryData)
|
||||
: QWidget(parent),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getSourcesList, true)),
|
||||
_actions(new QComboBox()),
|
||||
_settingsButtons(new SourceSettingsButtonSelection(this)),
|
||||
_settingsLayout(new QHBoxLayout()),
|
||||
|
|
@ -296,9 +303,7 @@ MacroActionSourceEdit::MacroActionSourceEdit(
|
|||
obs_module_text("AdvSceneSwitcher.action.source.refresh")))
|
||||
{
|
||||
populateActionSelection(_actions);
|
||||
auto sources = GetSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
populateModeSelection(_deinterlaceMode, deinterlaceModes);
|
||||
populateModeSelection(_deinterlaceOrder, deinterlaceFieldOrders);
|
||||
populateModeSelection(_settingsInputMethods, inputMethods);
|
||||
|
|
|
|||
|
|
@ -458,11 +458,18 @@ static inline void populateVolumeConditionSelection(QComboBox *list)
|
|||
}
|
||||
}
|
||||
|
||||
static QStringList getAudioSourcesList()
|
||||
{
|
||||
auto sources = GetAudioSourceNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroConditionAudioEdit::MacroConditionAudioEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroConditionAudio> entryData)
|
||||
: QWidget(parent),
|
||||
_checkTypes(new QComboBox()),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getAudioSourcesList, true)),
|
||||
_condition(new QComboBox()),
|
||||
_volumePercent(new VariableDoubleSpinBox()),
|
||||
_volumeDB(new VariableDoubleSpinBox),
|
||||
|
|
@ -484,10 +491,6 @@ MacroConditionAudioEdit::MacroConditionAudioEdit(
|
|||
_syncOffset->setMaximum(20000);
|
||||
_syncOffset->setSuffix("ms");
|
||||
|
||||
auto sources = GetAudioSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
QWidget::connect(_checkTypes, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(CheckTypeChanged(int)));
|
||||
QWidget::connect(
|
||||
|
|
|
|||
|
|
@ -185,10 +185,17 @@ static inline void populateConditionSelection(QComboBox *list)
|
|||
}
|
||||
}
|
||||
|
||||
static QStringList getFilterSourcesList()
|
||||
{
|
||||
auto sources = GetSourcesWithFilterNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroConditionFilterEdit::MacroConditionFilterEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroConditionFilter> entryData)
|
||||
: QWidget(parent),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getFilterSourcesList, true)),
|
||||
_filters(new FilterSelectionWidget(this, _sources, true)),
|
||||
_conditions(new QComboBox()),
|
||||
_getSettings(new QPushButton(obs_module_text(
|
||||
|
|
@ -200,9 +207,7 @@ MacroConditionFilterEdit::MacroConditionFilterEdit(
|
|||
obs_module_text("AdvSceneSwitcher.condition.filter.refresh")))
|
||||
{
|
||||
populateConditionSelection(_conditions);
|
||||
auto sources = GetSourcesWithFilterNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
_refreshSettingSelection->setToolTip(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.filter.refresh.tooltip"));
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ void MacroConditionGameCapture::SetupInitialState(obs_source_t *source)
|
|||
calldata_free(&cd);
|
||||
}
|
||||
|
||||
static QStringList getGameCaptureSourceNames()
|
||||
static QStringList getGameCaptureSourcesList()
|
||||
{
|
||||
auto sourceEnum = [](void *param, obs_source_t *source) -> bool /* -- */
|
||||
{
|
||||
|
|
@ -156,18 +156,16 @@ static QStringList getGameCaptureSourceNames()
|
|||
|
||||
QStringList list;
|
||||
obs_enum_sources(sourceEnum, &list);
|
||||
list.sort();
|
||||
return list;
|
||||
}
|
||||
|
||||
MacroConditionGameCaptureEdit::MacroConditionGameCaptureEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroConditionGameCapture> entryData)
|
||||
: QWidget(parent),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true))
|
||||
_sources(new SourceSelectionWidget(this, getGameCaptureSourcesList,
|
||||
true))
|
||||
{
|
||||
auto sources = getGameCaptureSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
QWidget::connect(_sources,
|
||||
SIGNAL(SourceChanged(const SourceSelection &)), this,
|
||||
SLOT(SourceChanged(const SourceSelection &)));
|
||||
|
|
|
|||
|
|
@ -610,6 +610,13 @@ static void populateCheckTypes(QComboBox *list)
|
|||
static_cast<int>(MacroConditionMedia::CheckType::TIME));
|
||||
}
|
||||
|
||||
static QStringList getMediaSourcesList()
|
||||
{
|
||||
auto sources = GetMediaSourceNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroConditionMediaEdit::MacroConditionMediaEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroConditionMedia> entryData)
|
||||
: QWidget(parent),
|
||||
|
|
@ -617,7 +624,7 @@ MacroConditionMediaEdit::MacroConditionMediaEdit(
|
|||
_checkTypes(new QComboBox()),
|
||||
_scenes(new SceneSelectionWidget(window(), true, true, true, true,
|
||||
true)),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getMediaSourcesList, true)),
|
||||
_states(new QComboBox()),
|
||||
_timeRestrictions(new QComboBox()),
|
||||
_time(new DurationSelection())
|
||||
|
|
@ -625,10 +632,6 @@ MacroConditionMediaEdit::MacroConditionMediaEdit(
|
|||
_states->setToolTip(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.media.inconsistencyInfo"));
|
||||
|
||||
auto sources = GetMediaSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
QWidget::connect(_sourceTypes, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(SourceTypeChanged(int)));
|
||||
QWidget::connect(_checkTypes, SIGNAL(currentIndexChanged(int)), this,
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ static QStringList getSlideshowNames()
|
|||
|
||||
QStringList list;
|
||||
obs_enum_sources(sourceEnum, &list);
|
||||
list.sort();
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -244,7 +245,7 @@ MacroConditionSlideshowEdit::MacroConditionSlideshowEdit(
|
|||
_conditions(new QComboBox(this)),
|
||||
_index(new VariableSpinBox(this)),
|
||||
_path(new VariableLineEdit(this)),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getSlideshowNames, true)),
|
||||
_regex(new RegexConfigWidget(this)),
|
||||
_layout(new QHBoxLayout())
|
||||
{
|
||||
|
|
@ -253,10 +254,6 @@ MacroConditionSlideshowEdit::MacroConditionSlideshowEdit(
|
|||
_index->setMinimum(1);
|
||||
populateConditionSelection(_conditions);
|
||||
|
||||
auto sources = getSlideshowNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
QWidget::connect(_conditions, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(ConditionChanged(int)));
|
||||
QWidget::connect(_sources,
|
||||
|
|
|
|||
|
|
@ -229,10 +229,19 @@ static inline void populateSelection(QComboBox *list,
|
|||
}
|
||||
}
|
||||
|
||||
static QStringList getSourcesList()
|
||||
{
|
||||
auto sources = GetSourceNames();
|
||||
sources.sort();
|
||||
auto scenes = GetSceneNames();
|
||||
scenes.sort();
|
||||
return sources + scenes;
|
||||
}
|
||||
|
||||
MacroConditionSourceEdit::MacroConditionSourceEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroConditionSource> entryData)
|
||||
: QWidget(parent),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getSourcesList, true)),
|
||||
_conditions(new QComboBox()),
|
||||
_getSettings(new QPushButton(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.source.getSettings"))),
|
||||
|
|
@ -246,11 +255,7 @@ MacroConditionSourceEdit::MacroConditionSourceEdit(
|
|||
{
|
||||
populateSelection(_conditions, sourceConditionTypes);
|
||||
populateSelection(_sizeCompareMethods, compareMethods);
|
||||
auto sources = GetSourceNames();
|
||||
sources.sort();
|
||||
auto scenes = GetSceneNames();
|
||||
scenes.sort();
|
||||
_sources->SetSourceNameList(sources + scenes);
|
||||
|
||||
_refreshSettingSelection->setToolTip(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.source.refresh.tooltip"));
|
||||
_size->setMaximum(999999);
|
||||
|
|
|
|||
|
|
@ -1131,13 +1131,20 @@ void AreaEdit::CheckAreaChanged(QRect rect)
|
|||
CheckAreaChanged(area);
|
||||
}
|
||||
|
||||
static QStringList getVideoSourcesList()
|
||||
{
|
||||
auto sources = GetVideoSourceNames();
|
||||
sources.sort();
|
||||
return sources;
|
||||
}
|
||||
|
||||
MacroConditionVideoEdit::MacroConditionVideoEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroConditionVideo> entryData)
|
||||
: QWidget(parent),
|
||||
_videoInputTypes(new QComboBox()),
|
||||
_scenes(new SceneSelectionWidget(this, true, false, true, true,
|
||||
true)),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_sources(new SourceSelectionWidget(this, getVideoSourcesList, true)),
|
||||
_condition(new QComboBox()),
|
||||
_reduceLatency(new QCheckBox(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.reduceLatency"))),
|
||||
|
|
@ -1190,10 +1197,6 @@ MacroConditionVideoEdit::MacroConditionVideoEdit(
|
|||
_area->setSizePolicy(QSizePolicy::MinimumExpanding,
|
||||
QSizePolicy::Preferred);
|
||||
|
||||
auto sources = GetVideoSourceNames();
|
||||
sources.sort();
|
||||
_sources->SetSourceNameList(sources);
|
||||
|
||||
QWidget::connect(_videoInputTypes, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(VideoInputTypeChanged(int)));
|
||||
QWidget::connect(_sources,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user