MainBar: refresh sample rate list when channels popup closes - #115
Conversation
Some drivers (e.g. sipeed-slogic-analyzer) change the available sample rates based on which channels are enabled. Connect the channels popup closed() signal to on_config_changed() so the sample rate dropdown is refreshed after the user toggles channels.
|
Tested this PR successfully with a Hantek 1008C driver whose available samplerates depend on the enabled-channel count. Closing the Channels popup refreshes the list correctly:
I found one remaining case involving restored settings. If PulseView exits with CH1+CH2 enabled, after restarting both channels are restored but the samplerate list initially contains the CH1-only rates. Opening and closing the Channels popup refreshes it correctly. It appears the initial samplerate list is queried before the saved channel-enable states are restored, while the Built successfully against PulseView master |
Summary
closed()signal toon_config_changed()to refresh the sample rate dropdown after toggling channelsProblem
Some drivers change available sample rates based on enabled channel count (e.g. sipeed-slogic-analyzer: 200MHz@16ch, 400MHz@8ch, 800MHz@4ch). The sample rate dropdown was not refreshed after toggling channels, so users had to manually change the rate to trigger a re-query.
Fix
When the channels popup closes, call
on_config_changed()which callscommit_sample_rate()→update_sample_rate_selector(), refreshing the rate dropdown.Test plan