simplify api by abstracting layer changes

This commit is contained in:
Jakob Ketterl
2021-03-06 22:20:47 +01:00
parent 6af0ad0262
commit 3d20e3ed80
3 changed files with 19 additions and 11 deletions

View File

@ -84,7 +84,7 @@ class SdrProfileCarousel(PropertyCarousel):
for profile_id, profile in changes.items():
if profile is PropertyDeleted:
self.removeLayer(profile_id)
elif not self.hasLayer(profile_id):
else:
self.addLayer(profile_id, profile)
def _getDefaultLayer(self):