(#657) Create new display model when adding / deleting a cross section

This commit is contained in:
Magne Sjaastad
2015-11-19 13:40:45 +01:00
parent 29973bbcf6
commit 089c9d47da
6 changed files with 48 additions and 29 deletions

View File

@@ -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);
}
//--------------------------------------------------------------------------------------------------

View File

@@ -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);
}
//--------------------------------------------------------------------------------------------------

View File

@@ -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);
}
//--------------------------------------------------------------------------------------------------