Skip to content

Commit

Permalink
#225 Clear Result Info and Result Plot when closing a case
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Jul 18, 2016
1 parent b0caea9 commit fa19a74
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ApplicationCode/Commands/RicCloseCaseFeature.cpp
Expand Up @@ -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();
}
}

Expand Down
15 changes: 12 additions & 3 deletions ApplicationCode/UserInterface/RiuMainWindow.cpp
Expand Up @@ -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);
Expand All @@ -200,6 +199,16 @@ void RiuMainWindow::cleanupGuiBeforeProjectClose()
m_processMonitor->startMonitorWorkProcess(NULL);
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::cleanupGuiBeforeProjectClose()
{
setPdmRoot(NULL);

cleanupGuiCaseClose();
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions ApplicationCode/UserInterface/RiuMainWindow.h
Expand Up @@ -75,6 +75,7 @@ class RiuMainWindow : public QMainWindow
static RiuMainWindow* instance();

void initializeGuiNewProjectLoaded();
void cleanupGuiCaseClose();
void cleanupGuiBeforeProjectClose();

void removeViewer( QWidget* viewer );
Expand Down

0 comments on commit fa19a74

Please sign in to comment.