From 8ac8d63b96966d9834b82031c23967f55c912579 Mon Sep 17 00:00:00 2001 From: Syarif Fakhri Date: Tue, 20 Sep 2022 14:47:28 +0800 Subject: [PATCH] Ensure that the closed state is consistent --- src/DockAreaWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index e8243b6..f0b036a 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -485,6 +485,7 @@ void CDockAreaWidget::insertDockWidget(int index, CDockWidget* DockWidget, if (Activate) { setCurrentIndex(index); + DockWidget->setClosedState(false); // Set current index can show the widget without changing the close state, added to keep the close state consistent } // If this dock area is hidden, then we need to make it visible again // by calling DockWidget->toggleViewInternal(true); @@ -641,6 +642,7 @@ void CDockAreaWidget::internalSetCurrentDockWidget(CDockWidget* DockWidget) } setCurrentIndex(Index); + DockWidget->setClosedState(false); // Set current index can show the widget without changing the close state, added to keep the close state consistent }