Skip to content

Commit

Permalink
Hide skip column when no valid skip values
Browse files Browse the repository at this point in the history
  • Loading branch information
kk7ds committed Sep 5, 2024
1 parent 1b183ba commit 58b1187
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions chirp/wxui/memedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,12 @@ def hidden_for(self, memory):
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')
Expand Down Expand Up @@ -1010,8 +1016,8 @@ def filter_unknowns(items):
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),
]
Expand Down

0 comments on commit 58b1187

Please sign in to comment.