mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-24 21:39:03 +08:00
Ensure that the closed state is consistent
This commit is contained in:
parent
0e6971e2ae
commit
8ac8d63b96
@ -485,6 +485,7 @@ void CDockAreaWidget::insertDockWidget(int index, CDockWidget* DockWidget,
|
|||||||
if (Activate)
|
if (Activate)
|
||||||
{
|
{
|
||||||
setCurrentIndex(index);
|
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
|
// If this dock area is hidden, then we need to make it visible again
|
||||||
// by calling DockWidget->toggleViewInternal(true);
|
// by calling DockWidget->toggleViewInternal(true);
|
||||||
@ -641,6 +642,7 @@ void CDockAreaWidget::internalSetCurrentDockWidget(CDockWidget* DockWidget)
|
|||||||
}
|
}
|
||||||
|
|
||||||
setCurrentIndex(Index);
|
setCurrentIndex(Index);
|
||||||
|
DockWidget->setClosedState(false); // Set current index can show the widget without changing the close state, added to keep the close state consistent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user