diff --git a/ApplicationLibCode/UserInterface/RiuMainWindow.cpp b/ApplicationLibCode/UserInterface/RiuMainWindow.cpp index d96b230a50..7bf1d33ca5 100644 --- a/ApplicationLibCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationLibCode/UserInterface/RiuMainWindow.cpp @@ -335,6 +335,8 @@ void RiuMainWindow::cleanupGuiCaseClose() //-------------------------------------------------------------------------------------------------- void RiuMainWindow::cleanupGuiBeforeProjectClose() { + m_mdiArea->closeAllSubWindows(); + setPdmRoot( nullptr ); cleanupGuiCaseClose(); diff --git a/ApplicationLibCode/UserInterface/RiuPlotMainWindow.cpp b/ApplicationLibCode/UserInterface/RiuPlotMainWindow.cpp index 4945e30cfe..43af07272e 100644 --- a/ApplicationLibCode/UserInterface/RiuPlotMainWindow.cpp +++ b/ApplicationLibCode/UserInterface/RiuPlotMainWindow.cpp @@ -245,6 +245,8 @@ void RiuPlotMainWindow::initializeGuiNewProjectLoaded() //-------------------------------------------------------------------------------------------------- void RiuPlotMainWindow::cleanupGuiBeforeProjectClose() { + m_mdiArea->closeAllSubWindows(); + setPdmRoot( nullptr ); for ( auto pdmUiPropertyView : m_propertyViews )