Hide skip column when no valid skip values

This commit is contained in:
Dan Smith 2024-09-05 16:25:58 -07:00 committed by Dan Smith
parent 1b183ba5f4
commit 58b1187311

View File

@ -607,6 +607,12 @@ class ChirpCrossModeColumn(ChirpChoiceColumn):
return memory.tmode != 'Cross'
class ChirpSkipColumn(ChirpChoiceColumn):
@property
def valid(self):
return self._features.valid_skips
class ChirpCommentColumn(ChirpMemoryColumn):
# This is just here so it is marked for translation
__TITLE = _('Comment')
@ -1010,8 +1016,8 @@ class ChirpMemEdit(common.ChirpEditor, common.ChirpSyncEditor):
ChirpChoiceColumn('tuning_step', self._radio,
valid_tuning_steps,
label=_('Tuning Step')),
ChirpChoiceColumn('skip', self._radio,
valid_skips),
ChirpSkipColumn('skip', self._radio,
valid_skips),
power_column,
ChirpCommentColumn('comment', self._radio),
]