diff --git a/ApplicationCode/Commands/RicCloseCaseFeature.cpp b/ApplicationCode/Commands/RicCloseCaseFeature.cpp index bb22b7bf25..6666c291d8 100644 --- a/ApplicationCode/Commands/RicCloseCaseFeature.cpp +++ b/ApplicationCode/Commands/RicCloseCaseFeature.cpp @@ -67,11 +67,15 @@ void RicCloseCaseFeature::onActionTriggered(bool isChecked) if (userConfirmedGridCaseGroupChange(casesToBeDeleted)) { deleteEclipseCase(eclipseCase); + + RiuMainWindow::instance()->cleanupGuiCaseClose(); } } else if (geoMechCase) { deleteGeoMechCase(geoMechCase); + + RiuMainWindow::instance()->cleanupGuiCaseClose(); } } diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index cc6283c46b..a7454f9a52 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -175,15 +175,14 @@ void RiuMainWindow::initializeGuiNewProjectLoaded() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuMainWindow::cleanupGuiBeforeProjectClose() +void RiuMainWindow::cleanupGuiCaseClose() { caf::CmdExecCommandManager::instance()->undoStack()->clear(); - setPdmRoot(NULL); setResultInfo(""); m_resultQwtPlot->deleteAllCurves(); - + if (m_pdmUiPropertyView) { m_pdmUiPropertyView->showProperties(NULL); @@ -200,6 +199,16 @@ void RiuMainWindow::cleanupGuiBeforeProjectClose() m_processMonitor->startMonitorWorkProcess(NULL); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMainWindow::cleanupGuiBeforeProjectClose() +{ + setPdmRoot(NULL); + + cleanupGuiCaseClose(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuMainWindow.h b/ApplicationCode/UserInterface/RiuMainWindow.h index b6dbb8fc6c..23dc3382bd 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.h +++ b/ApplicationCode/UserInterface/RiuMainWindow.h @@ -75,6 +75,7 @@ public: static RiuMainWindow* instance(); void initializeGuiNewProjectLoaded(); + void cleanupGuiCaseClose(); void cleanupGuiBeforeProjectClose(); void removeViewer( QWidget* viewer );