From 442fb04a9729bf04e75b92fa9aebdbf8d158c715 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 25 Oct 2016 10:03:55 +0200 Subject: [PATCH] #927 Rename from cross section to intersection --- .../RicAppendIntersectionFeature.cpp | 20 +++---- .../RicAppendIntersectionFeature.h | 4 +- .../RicNewPolylineIntersectionFeature.cpp | 30 +++++------ .../RicNewPolylineIntersectionFeature.h | 4 +- .../RicNewSimWellIntersectionFeature.cpp | 16 +++--- .../RicNewSimWellIntersectionFeature.h | 4 +- .../RicNewWellPathIntersectionFeature.cpp | 16 +++--- .../RicNewWellPathIntersectionFeature.h | 4 +- .../ProjectDataModel/RimEclipseWell.cpp | 2 +- .../ProjectDataModel/RimIntersection.cpp | 2 +- .../ProjectDataModel/RimIntersection.h | 2 +- .../RimIntersectionCollection.cpp | 54 ++++++++----------- .../RimIntersectionCollection.h | 6 +-- 13 files changed, 78 insertions(+), 86 deletions(-) diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.cpp index 7789ef4531..155a77fb5a 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.cpp @@ -48,12 +48,12 @@ void RicAppendIntersectionFeature::onActionTriggered(bool isChecked) caf::SelectionManager::instance()->objectsByType(&collection); CVF_ASSERT(collection.size() == 1); - RimIntersectionCollection* crossSectionCollection = NULL; - collection[0]->firstAncestorOrThisOfType(crossSectionCollection); + RimIntersectionCollection* intersectionCollection = NULL; + collection[0]->firstAncestorOrThisOfType(intersectionCollection); - CVF_ASSERT(crossSectionCollection); + CVF_ASSERT(intersectionCollection); - RicAppendIntersectionFeatureCmd* cmd = new RicAppendIntersectionFeatureCmd(crossSectionCollection); + RicAppendIntersectionFeatureCmd* cmd = new RicAppendIntersectionFeatureCmd(intersectionCollection); caf::CmdExecCommandManager::instance()->processExecuteCommand(cmd); } @@ -69,9 +69,9 @@ void RicAppendIntersectionFeature::setupActionLook(QAction* actionToSetup) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RicAppendIntersectionFeatureCmd::RicAppendIntersectionFeatureCmd(RimIntersectionCollection* crossSectionCollection) +RicAppendIntersectionFeatureCmd::RicAppendIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection) : CmdExecuteCommand(NULL), - m_crossSectionCollection(crossSectionCollection) + m_intersectionCollection(intersectionCollection) { } @@ -95,11 +95,11 @@ QString RicAppendIntersectionFeatureCmd::name() //-------------------------------------------------------------------------------------------------- void RicAppendIntersectionFeatureCmd::redo() { - CVF_ASSERT(m_crossSectionCollection); + CVF_ASSERT(m_intersectionCollection); - RimIntersection* crossSection = new RimIntersection(); - crossSection->name = QString("Intersection"); - m_crossSectionCollection->appendCrossSection(crossSection); + RimIntersection* intersection = new RimIntersection(); + intersection->name = QString("Intersection"); + m_intersectionCollection->appendIntersection(intersection); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h index a227c6aa70..58fa795d27 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h @@ -32,7 +32,7 @@ class RimIntersectionCollection; class RicAppendIntersectionFeatureCmd : public caf::CmdExecuteCommand { public: - RicAppendIntersectionFeatureCmd(RimIntersectionCollection* crossSectionCollection); + RicAppendIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection); virtual ~RicAppendIntersectionFeatureCmd(); virtual QString name(); @@ -40,7 +40,7 @@ public: virtual void undo(); private: - caf::PdmPointer m_crossSectionCollection; + caf::PdmPointer m_intersectionCollection; }; diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.cpp index d1e4bc4fdb..fd2b0b6faf 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.cpp @@ -88,22 +88,22 @@ bool RicNewPolylineIntersectionFeature::handleEvent(cvf::Object* eventObject) RicViewerEventObject* polylineUiEvent = dynamic_cast(eventObject); if (polylineUiEvent) { - RimIntersection* crossSection = selection[0]; + RimIntersection* intersection = selection[0]; RimCase* rimCase = NULL; - crossSection->firstAncestorOrThisOfType(rimCase); + intersection->firstAncestorOrThisOfType(rimCase); CVF_ASSERT(rimCase); - if (crossSection->inputPolyLineFromViewerEnabled()) + if (intersection->inputPolyLineFromViewerEnabled()) { - crossSection->appendPointToPolyLine(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint); + intersection->appendPointToPolyLine(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint); // Further Ui processing is stopped when true is returned return true; } - else if (crossSection->inputExtrusionPointsFromViewerEnabled()) + else if (intersection->inputExtrusionPointsFromViewerEnabled()) { - crossSection->appendPointToExtrusionDirection(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint); + intersection->appendPointToExtrusionDirection(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint); // Further Ui processing is stopped when true is returned return true; @@ -117,9 +117,9 @@ bool RicNewPolylineIntersectionFeature::handleEvent(cvf::Object* eventObject) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RicNewPolylineIntersectionFeatureCmd::RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* crossSectionCollection) +RicNewPolylineIntersectionFeatureCmd::RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection) : CmdExecuteCommand(NULL), - m_crossSectionCollection(crossSectionCollection) + m_intersectionCollection(intersectionCollection) { } @@ -143,18 +143,18 @@ QString RicNewPolylineIntersectionFeatureCmd::name() //-------------------------------------------------------------------------------------------------- void RicNewPolylineIntersectionFeatureCmd::redo() { - CVF_ASSERT(m_crossSectionCollection); + CVF_ASSERT(m_intersectionCollection); - RimIntersection* crossSection = new RimIntersection(); - crossSection->name = "Polyline"; - crossSection->type = RimIntersection::CS_POLYLINE; - crossSection->inputPolyLineFromViewerEnabled = true; + RimIntersection* intersection = new RimIntersection(); + intersection->name = "Polyline"; + intersection->type = RimIntersection::CS_POLYLINE; + intersection->inputPolyLineFromViewerEnabled = true; - m_crossSectionCollection->appendCrossSection(crossSection); + m_intersectionCollection->appendIntersection(intersection); RiuSelectionManager::instance()->deleteAllItems(); - RiuMainWindow::instance()->selectAsCurrentItem(crossSection); + RiuMainWindow::instance()->selectAsCurrentItem(intersection); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h index c2796e1529..0381ff5f1e 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h @@ -37,7 +37,7 @@ class RimIntersectionCollection; class RicNewPolylineIntersectionFeatureCmd : public caf::CmdExecuteCommand { public: - RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* crossSectionCollection); + RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection); virtual ~RicNewPolylineIntersectionFeatureCmd(); virtual QString name(); @@ -45,7 +45,7 @@ public: virtual void undo(); private: - caf::PdmPointer m_crossSectionCollection; + caf::PdmPointer m_intersectionCollection; }; diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.cpp index 17ae3b53ff..e273ae30e2 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.cpp @@ -72,9 +72,9 @@ void RicNewSimWellIntersectionFeature::setupActionLook(QAction* actionToSetup) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RicNewSimWellIntersectionCmd::RicNewSimWellIntersectionCmd(RimIntersectionCollection* crossSectionCollection, RimEclipseWell* simWell) +RicNewSimWellIntersectionCmd::RicNewSimWellIntersectionCmd(RimIntersectionCollection* intersectionCollection, RimEclipseWell* simWell) : CmdExecuteCommand(NULL), - m_crossSectionCollection(crossSectionCollection), + m_intersectionCollection(intersectionCollection), m_wellPath(simWell) { } @@ -99,15 +99,15 @@ QString RicNewSimWellIntersectionCmd::name() //-------------------------------------------------------------------------------------------------- void RicNewSimWellIntersectionCmd::redo() { - CVF_ASSERT(m_crossSectionCollection); + CVF_ASSERT(m_intersectionCollection); CVF_ASSERT(m_wellPath); - RimIntersection* crossSection = new RimIntersection(); - crossSection->name = m_wellPath->name; - crossSection->type = RimIntersection::CS_SIMULATION_WELL; - crossSection->simulationWell = m_wellPath; + RimIntersection* intersection = new RimIntersection(); + intersection->name = m_wellPath->name; + intersection->type = RimIntersection::CS_SIMULATION_WELL; + intersection->simulationWell = m_wellPath; - m_crossSectionCollection->appendCrossSection(crossSection); + m_intersectionCollection->appendIntersection(intersection); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.h index 4c88494e6c..e3b0ed1be2 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.h @@ -33,7 +33,7 @@ class RimEclipseWell; class RicNewSimWellIntersectionCmd : public caf::CmdExecuteCommand { public: - RicNewSimWellIntersectionCmd(RimIntersectionCollection* crossSectionCollection, RimEclipseWell* simWell); + RicNewSimWellIntersectionCmd(RimIntersectionCollection* intersectionCollection, RimEclipseWell* simWell); virtual ~RicNewSimWellIntersectionCmd(); virtual QString name(); @@ -41,7 +41,7 @@ public: virtual void undo(); private: - caf::PdmPointer m_crossSectionCollection; + caf::PdmPointer m_intersectionCollection; caf::PdmPointer m_wellPath; }; diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.cpp index e4b0f6b5c4..277dd6f850 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.cpp @@ -81,9 +81,9 @@ void RicNewWellPathIntersectionFeature::setupActionLook(QAction* actionToSetup) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RicNewWellPathIntersectionFeatureCmd::RicNewWellPathIntersectionFeatureCmd(RimIntersectionCollection* crossSectionCollection, RimWellPath* wellPath) +RicNewWellPathIntersectionFeatureCmd::RicNewWellPathIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection, RimWellPath* wellPath) : CmdExecuteCommand(NULL), - m_crossSectionCollection(crossSectionCollection), + m_intersectionCollection(intersectionCollection), m_wellPath(wellPath) { } @@ -108,15 +108,15 @@ QString RicNewWellPathIntersectionFeatureCmd::name() //-------------------------------------------------------------------------------------------------- void RicNewWellPathIntersectionFeatureCmd::redo() { - CVF_ASSERT(m_crossSectionCollection); + CVF_ASSERT(m_intersectionCollection); CVF_ASSERT(m_wellPath); - RimIntersection* crossSection = new RimIntersection(); - crossSection->name = m_wellPath->name; - crossSection->type = RimIntersection::CS_WELL_PATH; - crossSection->wellPath = m_wellPath; + RimIntersection* intersection = new RimIntersection(); + intersection->name = m_wellPath->name; + intersection->type = RimIntersection::CS_WELL_PATH; + intersection->wellPath = m_wellPath; - m_crossSectionCollection->appendCrossSection(crossSection); + m_intersectionCollection->appendIntersection(intersection); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.h index aa156d35f5..d3b74a3576 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.h @@ -33,7 +33,7 @@ class RimWellPath; class RicNewWellPathIntersectionFeatureCmd : public caf::CmdExecuteCommand { public: - RicNewWellPathIntersectionFeatureCmd(RimIntersectionCollection* crossSectionCollection, RimWellPath* wellPath); + RicNewWellPathIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection, RimWellPath* wellPath); virtual ~RicNewWellPathIntersectionFeatureCmd(); virtual QString name(); @@ -41,7 +41,7 @@ public: virtual void undo(); private: - caf::PdmPointer m_crossSectionCollection; + caf::PdmPointer m_intersectionCollection; caf::PdmPointer m_wellPath; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseWell.cpp b/ApplicationCode/ProjectDataModel/RimEclipseWell.cpp index 2437e1f20c..2472ccef0f 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseWell.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseWell.cpp @@ -180,7 +180,7 @@ bool RimEclipseWell::calculateWellPipeVisibility(size_t frameIndex) if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY) return true; - if (m_reservoirView->crossSectionCollection()->hasActiveCrossSectionForSimulationWell(this)) + if (m_reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this)) return true; if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS) diff --git a/ApplicationCode/ProjectDataModel/RimIntersection.cpp b/ApplicationCode/ProjectDataModel/RimIntersection.cpp index fa248a03a2..6f22a0f55a 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersection.cpp +++ b/ApplicationCode/ProjectDataModel/RimIntersection.cpp @@ -370,7 +370,7 @@ std::vector< std::vector > RimIntersection::polyLines() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RivIntersectionPartMgr* RimIntersection::crossSectionPartMgr() +RivIntersectionPartMgr* RimIntersection::intersectionPartMgr() { if (m_crossSectionPartMgr.isNull()) m_crossSectionPartMgr = new RivIntersectionPartMgr(this); diff --git a/ApplicationCode/ProjectDataModel/RimIntersection.h b/ApplicationCode/ProjectDataModel/RimIntersection.h index 045623b43d..63abfaa413 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersection.h +++ b/ApplicationCode/ProjectDataModel/RimIntersection.h @@ -78,7 +78,7 @@ public: std::vector< std::vector > polyLines() const; void appendPointToPolyLine(const cvf::Vec3d& point); - RivIntersectionPartMgr* crossSectionPartMgr(); + RivIntersectionPartMgr* intersectionPartMgr(); std::vector< std::vector > polyLinesForExtrusionDirection() const; void appendPointToExtrusionDirection(const cvf::Vec3d& point); diff --git a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp index 523bd00059..350d3bd606 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp @@ -19,15 +19,15 @@ #include "RimIntersectionCollection.h" -#include "RimIntersection.h" #include "RimEclipseWell.h" +#include "RimIntersection.h" +#include "RimIntersectionBox.h" #include "RimView.h" #include "RiuMainWindow.h" -#include "RivIntersectionPartMgr.h" -#include "RimIntersectionBox.h" #include "RivIntersectionBoxPartMgr.h" +#include "RivIntersectionPartMgr.h" CAF_PDM_SOURCE_INIT(RimIntersectionCollection, "CrossSectionCollection"); @@ -39,8 +39,8 @@ RimIntersectionCollection::RimIntersectionCollection() { CAF_PDM_InitObject("Intersections", ":/CrossSections16x16.png", "", ""); - CAF_PDM_InitFieldNoDefault(&m_crossSections, "CrossSections", "Intersections", "", "", ""); - m_crossSections.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&m_intersections, "CrossSections", "Intersections", "", "", ""); + m_intersections.uiCapability()->setUiHidden(true); CAF_PDM_InitFieldNoDefault(&m_intersectionBoxes, "IntersectionBoxes", "IntersectionBoxes", "", "", ""); m_intersectionBoxes.uiCapability()->setUiHidden(true); @@ -54,7 +54,7 @@ RimIntersectionCollection::RimIntersectionCollection() //-------------------------------------------------------------------------------------------------- RimIntersectionCollection::~RimIntersectionCollection() { - m_crossSections.deleteAllChildObjects(); + m_intersections.deleteAllChildObjects(); m_intersectionBoxes.deleteAllChildObjects(); } @@ -73,18 +73,16 @@ void RimIntersectionCollection::applySingleColorEffect() { if(!this->isActive()) return; - for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx) + for (RimIntersection* cs : m_intersections) { - RimIntersection* cs = m_crossSections[csIdx]; if (cs->isActive) { - cs->crossSectionPartMgr()->applySingleColorEffect(); + cs->intersectionPartMgr()->applySingleColorEffect(); } } - for(size_t csIdx = 0; csIdx < m_intersectionBoxes.size(); ++csIdx) + for (RimIntersectionBox* cs : m_intersectionBoxes) { - RimIntersectionBox* cs = m_intersectionBoxes[csIdx]; if(cs->isActive) { cs->intersectionBoxPartMgr()->applySingleColorEffect(); @@ -99,18 +97,16 @@ void RimIntersectionCollection::updateCellResultColor(size_t timeStepIndex) { if(!this->isActive()) return; - for(size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx) + for (RimIntersection* cs : m_intersections) { - RimIntersection* cs = m_crossSections[csIdx]; if(cs->isActive) { - cs->crossSectionPartMgr()->updateCellResultColor(timeStepIndex); + cs->intersectionPartMgr()->updateCellResultColor(timeStepIndex); } } - for(size_t csIdx = 0; csIdx < m_intersectionBoxes.size(); ++csIdx) + for (RimIntersectionBox* cs : m_intersectionBoxes) { - RimIntersectionBox* cs = m_intersectionBoxes[csIdx]; if(cs->isActive) { cs->intersectionBoxPartMgr()->updateCellResultColor(timeStepIndex); @@ -125,20 +121,18 @@ void RimIntersectionCollection::appendPartsToModel(cvf::ModelBasicList* model, c { if (!isActive) return; - for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx) + for (RimIntersection* cs : m_intersections) { - RimIntersection* cs = m_crossSections[csIdx]; if (cs->isActive) { - cs->crossSectionPartMgr()->appendNativeCrossSectionFacesToModel(model, scaleTransform); - cs->crossSectionPartMgr()->appendMeshLinePartsToModel(model, scaleTransform); - cs->crossSectionPartMgr()->appendPolylinePartsToModel(model, scaleTransform); + cs->intersectionPartMgr()->appendNativeCrossSectionFacesToModel(model, scaleTransform); + cs->intersectionPartMgr()->appendMeshLinePartsToModel(model, scaleTransform); + cs->intersectionPartMgr()->appendPolylinePartsToModel(model, scaleTransform); } } - for(size_t csIdx = 0; csIdx < m_intersectionBoxes.size(); ++csIdx) + for (RimIntersectionBox* cs : m_intersectionBoxes) { - RimIntersectionBox* cs = m_intersectionBoxes[csIdx]; if(cs->isActive) { cs->intersectionBoxPartMgr()->appendNativeCrossSectionFacesToModel(model, scaleTransform); @@ -155,12 +149,12 @@ void RimIntersectionCollection::appendPartsToModel(cvf::ModelBasicList* model, c //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimIntersectionCollection::appendCrossSection(RimIntersection* crossSection) +void RimIntersectionCollection::appendIntersection(RimIntersection* intersection) { - m_crossSections.push_back(crossSection); + m_intersections.push_back(intersection); updateConnectedEditors(); - RiuMainWindow::instance()->selectAsCurrentItem(crossSection); + RiuMainWindow::instance()->selectAsCurrentItem(intersection); RimView* rimView = NULL; firstAncestorOrThisOfType(rimView); @@ -197,14 +191,12 @@ void RimIntersectionCollection::fieldChangedByUi(const caf::PdmFieldHandle* chan //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimIntersectionCollection::hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const +bool RimIntersectionCollection::hasActiveIntersectionForSimulationWell(RimEclipseWell* eclipseWell) const { if (!isActive) return false; - for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx) + for (RimIntersection* cs : m_intersections) { - RimIntersection* cs = m_crossSections[csIdx]; - if (cs->isActive && cs->type() == RimIntersection::CS_SIMULATION_WELL && cs->simulationWell() == eclipseWell) @@ -221,7 +213,7 @@ bool RimIntersectionCollection::hasActiveCrossSectionForSimulationWell(RimEclips //-------------------------------------------------------------------------------------------------- void RimIntersectionCollection::updateIntersectionBoxGeometry() { - for (auto intersectionBox : m_intersectionBoxes) + for (RimIntersectionBox* intersectionBox : m_intersectionBoxes) { intersectionBox->updateBoxManipulatorGeometry(); } diff --git a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h index 84fd1b52cc..29866d3f11 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h +++ b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h @@ -48,10 +48,10 @@ public: caf::PdmField isActive; - void appendCrossSection(RimIntersection* crossSection); + void appendIntersection(RimIntersection* intersection); void appendIntersectionBox(RimIntersectionBox* intersectionBox); - bool hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const; + bool hasActiveIntersectionForSimulationWell(RimEclipseWell* eclipseWell) const; void updateIntersectionBoxGeometry(); @@ -66,6 +66,6 @@ protected: virtual caf::PdmFieldHandle* objectToggleField(); private: - caf::PdmChildArrayField m_crossSections; + caf::PdmChildArrayField m_intersections; caf::PdmChildArrayField m_intersectionBoxes; };