mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#657) Create new display model when adding / deleting a cross section
This commit is contained in:
@@ -22,8 +22,6 @@
|
||||
#include "RimCrossSection.h"
|
||||
#include "RimCrossSectionCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -96,11 +94,8 @@ void RicAppendCrossSectionFeatureCmd::redo()
|
||||
CVF_ASSERT(m_crossSectionCollection);
|
||||
|
||||
RimCrossSection* crossSection = new RimCrossSection();
|
||||
crossSection->name = QString("Cross Section (%1)").arg(m_crossSectionCollection->crossSections.size() + 1);
|
||||
m_crossSectionCollection->crossSections.push_back(crossSection);
|
||||
|
||||
m_crossSectionCollection->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->setCurrentObjectInTreeView(crossSection);
|
||||
crossSection->name = QString("Cross Section");
|
||||
m_crossSectionCollection->appendCrossSection(crossSection);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseWell.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -109,10 +107,7 @@ void RicNewSimWellCrossSectionCmd::redo()
|
||||
crossSection->type = RimCrossSection::CS_SIMULATION_WELL;
|
||||
crossSection->simulationWell = m_wellPath;
|
||||
|
||||
m_crossSectionCollection->crossSections.push_back(crossSection);
|
||||
|
||||
m_crossSectionCollection->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->setCurrentObjectInTreeView(crossSection);
|
||||
m_crossSectionCollection->appendCrossSection(crossSection);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#include "RimCrossSectionCollection.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -123,10 +121,7 @@ void RicNewWellPathCrossSectionFeatureCmd::redo()
|
||||
crossSection->type = RimCrossSection::CS_WELL_PATH;
|
||||
crossSection->wellPath = m_wellPath;
|
||||
|
||||
m_crossSectionCollection->crossSections.push_back(crossSection);
|
||||
|
||||
m_crossSectionCollection->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->setCurrentObjectInTreeView(crossSection);
|
||||
m_crossSectionCollection->appendCrossSection(crossSection);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user