Skip to content

Commit 404ae17

Browse files
v-einhoffstadt
authored andcommitted
fix (mvTheme): Pop must be done in the reverse order of push.
This is needed to properly restore _specificComponentPtr back when there are multiple components with the same specificType.
1 parent dbc206d commit 404ae17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mvThemes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ void mvTheme::push_theme_components()
8686
void mvTheme::pop_theme_components()
8787
{
8888

89-
for (auto& child : childslots[1])
89+
for (auto it = childslots[1].rbegin(); it != childslots[1].rend(); it++)
9090
{
91-
auto comp = static_cast<mvThemeComponent*>(child.get());
91+
auto comp = static_cast<mvThemeComponent*>(it->get());
9292
if (comp->_specificType == (int)mvAppItemType::All || comp->_specificType == _specificType)
9393
{
9494
if (_specificEnabled == comp->_specificEnabled)

0 commit comments

Comments
 (0)