OutputPane: Fix wrongly checked button with "Reset to Default"

We only want to set the button "checked" if the Output panes are
visible.

Amends b72f9dc8ef

Change-Id: Ia6fd461338086e141dac09ebf47de09c0635b28b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Eike Ziller
2023-09-18 13:36:39 +02:00
parent 768f12e033
commit 8a72318c97

View File

@@ -789,7 +789,8 @@ void OutputPaneManager::popupMenu()
for (int i = 0; i < g_outputPanes.size(); ++i) {
OutputPaneData &data = g_outputPanes[i];
const bool buttonVisible = data.pane->priorityInStatusBar() >= 0;
const bool paneVisible = currentIndex() == i;
const bool paneVisible = currentIndex() == i
&& OutputPanePlaceHolder::isCurrentVisible();
if (buttonVisible) {
data.button->setChecked(paneVisible);
data.button->setVisible(true);