Allow selecting either an action or condition but not both

This commit is contained in:
WarmUpTill
2022-02-20 20:09:24 +01:00
committed by WarmUpTill
parent 1054bce4a7
commit 89efb6d1c8
4 changed files with 19 additions and 14 deletions

View File

@@ -581,3 +581,14 @@ void AdvSceneSwitcher::HighlightMatchedMacros()
}
}
}
void AdvSceneSwitcher::SetSelection(MacroSegmentList *list, int idx)
{
for (int i = 0; i < list->ContentLayout()->count(); ++i) {
auto widget = static_cast<MacroSegmentEdit *>(
list->ContentLayout()->itemAt(i)->widget());
if (widget) {
widget->SetSelected(i == idx);
}
}
}