mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Fix macro references not being resolved when importing macros
This commit is contained in:
parent
7d1253e14e
commit
7914f75876
|
|
@ -413,13 +413,13 @@ void AdvSceneSwitcher::ImportMacros()
|
|||
|
||||
int groupSize = 0;
|
||||
std::shared_ptr<Macro> group;
|
||||
std::vector<std::shared_ptr<Macro>> importedMacros;
|
||||
|
||||
auto lock = LockContext();
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
OBSDataAutoRelease array_obj = obs_data_array_item(array, i);
|
||||
auto macro = std::make_shared<Macro>();
|
||||
macro->Load(array_obj);
|
||||
macro->PostLoad();
|
||||
|
||||
if (macroNameExists(macro->Name()) &&
|
||||
!ResolveMacroImportNameConflict(macro)) {
|
||||
|
|
@ -427,6 +427,7 @@ void AdvSceneSwitcher::ImportMacros()
|
|||
continue;
|
||||
}
|
||||
|
||||
importedMacros.emplace_back(macro);
|
||||
switcher->macros.emplace_back(macro);
|
||||
if (groupSize > 0 && !macro->IsGroup()) {
|
||||
Macro::PrepareMoveToGroup(group, macro);
|
||||
|
|
@ -443,6 +444,10 @@ void AdvSceneSwitcher::ImportMacros()
|
|||
}
|
||||
}
|
||||
|
||||
for (const auto ¯o : importedMacros) {
|
||||
macro->PostLoad();
|
||||
}
|
||||
|
||||
ui->macros->Reset(switcher->macros,
|
||||
switcher->macroProperties._highlightExecuted);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user