Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix skip column hiding #1111

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions chirp/drivers/uvk5.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ def get_features(self):
rf.valid_power_levels = UVK5_POWER_LEVELS
rf.valid_special_chans = list(SPECIALS.keys())
rf.valid_duplexes = ["", "-", "+", "off"]
rf.valid_skips = []

# hack so we can input any frequency,
# the 0.1 and 0.01 steps don't work unfortunately
Expand All @@ -697,8 +698,6 @@ def get_features(self):
rf.valid_modes = ["FM", "NFM", "AM", "NAM"]
rf.valid_tmodes = ["", "Tone", "TSQL", "DTCS", "Cross"]

rf.valid_skips = [""]

# This radio supports memories 1-200, 201-214 are the VFO memories
rf.memory_bounds = (1, 200)

Expand Down
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
Loading