UI: ZonesWindow: Fix source init.

This commit is contained in:
Nodir Temirkhodjaev 2020-02-12 17:10:03 +05:00
parent 6f12f97634
commit 3aef52b5ed

View File

@ -306,8 +306,8 @@ void ZoneListModel::initZoneTypes()
for (auto &typeVar : zoneTypes) { for (auto &typeVar : zoneTypes) {
ZoneTypeWrapper zoneType(typeVar); ZoneTypeWrapper zoneType(typeVar);
zoneType.setIndex(index++); zoneType.setIndex(index++);
m_zoneTypesMap.insert(zoneType.code(), typeVar); m_zoneTypesMap.insert(zoneType.code(), zoneType.map());
m_zoneTypes.append(typeVar); m_zoneTypes.append(zoneType.map());
} }
} }
@ -328,7 +328,7 @@ void ZoneListModel::initZoneSources()
for (auto &sourceVar : zoneSources) { for (auto &sourceVar : zoneSources) {
ZoneSourceWrapper zoneSource(sourceVar); ZoneSourceWrapper zoneSource(sourceVar);
zoneSource.setIndex(index++); zoneSource.setIndex(index++);
m_zoneSourcesMap.insert(zoneSource.code(), sourceVar); m_zoneSourcesMap.insert(zoneSource.code(), zoneSource.map());
m_zoneSources.append(sourceVar); m_zoneSources.append(zoneSource.map());
} }
} }