From 29444470db585e915a97453c792255abc59f0e43 Mon Sep 17 00:00:00 2001 From: "Mark.lin" Date: Tue, 1 Sep 2026 17:08:45 +0800 Subject: [PATCH] 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. --- samples/gvfg_qt_preview/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/gvfg_qt_preview/mainwindow.cpp b/samples/gvfg_qt_preview/mainwindow.cpp index deaadf7..4f33f5b 100644 --- a/samples/gvfg_qt_preview/mainwindow.cpp +++ b/samples/gvfg_qt_preview/mainwindow.cpp @@ -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);