Keep unsupported channel 1 UI hidden
Move the channel 1 visibility gate to shared scope and skip channel 1 signal refresh while its UI is disabled, keeping the temporary restriction consistent across UI updates.
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr bool kChannel1UiVisible = false;
|
||||
|
||||
QString logFilePrefix()
|
||||
{
|
||||
#if GVFG_INTERNAL_DIAGNOSTICS
|
||||
@@ -690,6 +692,9 @@ void MainWindow::updateSignalStatus(bool queryHardware)
|
||||
#endif
|
||||
for (int channelIndex = GVFG_CHANNEL_0; channelIndex <= GVFG_CHANNEL_1; ++channelIndex)
|
||||
{
|
||||
if (channelIndex == GVFG_CHANNEL_1 && !kChannel1UiVisible)
|
||||
continue;
|
||||
|
||||
ChannelRuntime &channel = channels_[channelIndex];
|
||||
if (!channel.opened)
|
||||
{
|
||||
@@ -829,7 +834,6 @@ void MainWindow::updateSignalStatus(bool queryHardware)
|
||||
|
||||
void MainWindow::updateUiState()
|
||||
{
|
||||
constexpr bool kChannel1UiVisible = false;
|
||||
const bool deviceOpen = handle_ != nullptr;
|
||||
const bool ch0Running = channels_[0].running.load(std::memory_order_acquire);
|
||||
const bool ch1Running = channels_[1].running.load(std::memory_order_acquire);
|
||||
|
||||
Reference in New Issue
Block a user