Add menu scopes to state before closing them

This commit is contained in:
Jan
2021-11-06 17:47:18 +01:00
parent bf19208351
commit 5af2e6da61
8 changed files with 50 additions and 18 deletions

View File

@ -19,6 +19,10 @@ GenericMenuEventHandlerSetPropertySequence::GenericMenuEventHandlerSetPropertySe
void GenericMenuEventHandlerSetPropertySequence::ProcessMatch(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result) const
{
state->m_current_event_handler_set = std::make_unique<CommonEventHandlerSet>();
state->m_event_handler_set_callback = m_set_callback;
if (m_set_callback)
{
auto newEventHandlerSet = std::make_unique<CommonEventHandlerSet>();
state->m_current_event_handler_set = newEventHandlerSet.get();
m_set_callback(state, std::move(newEventHandlerSet));
}
}