From 3037837be6b9dff3ebd2a1031feb5a4fa3e381fc Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Wed, 7 Jul 2021 16:37:25 -0500 Subject: [PATCH] Fixed logic to remove the tabs not close them. Signed-off-by: Chris Galvan --- .../AzQtComponents/Components/FancyDocking.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 3b9fe9f011..7417bed2a0 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -3297,7 +3297,12 @@ namespace AzQtComponents continue; } - tabWidget->closeTabs(); + // Remove the tabs from the tab widget (we don't actually want to close them, which could delete them at this point) + int numTabs = tabWidget->count(); + for (int i = 0; i < numTabs; ++i) + { + tabWidget->removeTab(0); + } } // Restore the floating windows