fix(color): top bar widgets may not get removed when switching models (#5908)
This commit is contained in:
@@ -66,6 +66,8 @@ void LayoutFactory::deleteCustomScreens()
|
|||||||
screen = nullptr;
|
screen = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ViewMain::instance()->getTopbar()->removeAllWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LayoutFactory::loadDefaultLayout()
|
void LayoutFactory::loadDefaultLayout()
|
||||||
|
|||||||
@@ -83,6 +83,12 @@ class WidgetsContainerImpl : public WidgetsContainer
|
|||||||
|
|
||||||
virtual void create() { memset(persistentData, 0, sizeof(PersistentData)); }
|
virtual void create() { memset(persistentData, 0, sizeof(PersistentData)); }
|
||||||
|
|
||||||
|
void removeAllWidgets()
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < N; i++)
|
||||||
|
removeWidget(i);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void load()
|
virtual void load()
|
||||||
{
|
{
|
||||||
unsigned int count = getZonesCount();
|
unsigned int count = getZonesCount();
|
||||||
|
|||||||
Reference in New Issue
Block a user