[Color] delete first all widgets before loading the new ones
This commit is contained in:
@@ -92,14 +92,15 @@ class WidgetsContainerImpl: public WidgetsContainer
|
|||||||
{
|
{
|
||||||
unsigned int count = getZonesCount();
|
unsigned int count = getZonesCount();
|
||||||
for (unsigned int i = 0; i < count; i++) {
|
for (unsigned int i = 0; i < count; i++) {
|
||||||
|
|
||||||
// remove old widget
|
// remove old widget
|
||||||
if (widgets[i]) {
|
if (widgets[i]) {
|
||||||
removeField(widgets[i]);
|
removeField(widgets[i]);
|
||||||
widgets[i]->deleteLater();
|
widgets[i]->deleteLater();
|
||||||
widgets[i] = nullptr;
|
widgets[i] = nullptr;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < count; i++) {
|
||||||
// and load new one if required
|
// and load new one if required
|
||||||
if (persistentData->zones[i].widgetName[0]) {
|
if (persistentData->zones[i].widgetName[0]) {
|
||||||
char name[WIDGET_NAME_LEN + 1];
|
char name[WIDGET_NAME_LEN + 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user