implement profile removal behaviour

This commit is contained in:
Jakob Ketterl
2021-03-05 19:09:51 +01:00
parent 2ba2ec38e0
commit 2e28694b49
3 changed files with 41 additions and 4 deletions

View File

@ -82,6 +82,12 @@ class SdrProfileCarousel(PropertyCarousel):
elif not self.hasLayer(profile_id):
self.addLayer(profile_id, profile)
def _getDefaultLayer(self):
# return the first available profile, or the default empty layer if we don't have any
if self.layers:
return next(iter(self.layers.values()))
return super()._getDefaultLayer()
class SdrSource(ABC):
def __init__(self, id, props):