mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-14 21:31:45 -05:00
Add group support to MacroSelection
This commit is contained in:
@@ -15,9 +15,6 @@ MacroSelection::MacroSelection(QWidget *parent)
|
||||
obs_module_text("AdvSceneSwitcher.selectMacro"))
|
||||
{
|
||||
for (const auto &m : GetTopLevelMacros()) {
|
||||
if (m->IsGroup()) {
|
||||
continue;
|
||||
}
|
||||
addItem(QString::fromStdString(m->Name()));
|
||||
}
|
||||
|
||||
@@ -66,6 +63,22 @@ void MacroSelection::HideSelectedMacro()
|
||||
qobject_cast<QListView *>(view())->setRowHidden(idx, true);
|
||||
}
|
||||
|
||||
void MacroSelection::HideGroups()
|
||||
{
|
||||
for (const auto ¯o : GetTopLevelMacros()) {
|
||||
if (!macro->IsGroup()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int idx = findText(QString::fromStdString(macro->Name()));
|
||||
if (idx == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
qobject_cast<QListView *>(view())->setRowHidden(idx, true);
|
||||
}
|
||||
}
|
||||
|
||||
void MacroSelection::ShowAllMacros()
|
||||
{
|
||||
auto v = qobject_cast<QListView *>(view());
|
||||
|
||||
Reference in New Issue
Block a user