#2390 Intersections: Add noUpdate-version of appendIntersection and appendIntersectionBox

This commit is contained in:
Rebecca Cox
2018-01-24 11:30:39 +01:00
parent 97aab5bda5
commit 140b75df88
2 changed files with 21 additions and 3 deletions

View File

@@ -160,7 +160,7 @@ void RimIntersectionCollection::appendIntersectionAndUpdate(RimIntersection* int
updateConnectedEditors(); updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersection); RiuMainWindow::instance()->selectAsCurrentItem(intersection);
Rim3dView* rimView = NULL; Rim3dView* rimView = nullptr;
firstAncestorOrThisOfType(rimView); firstAncestorOrThisOfType(rimView);
if (rimView) if (rimView)
{ {
@@ -168,6 +168,14 @@ void RimIntersectionCollection::appendIntersectionAndUpdate(RimIntersection* int
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::appendIntersectionNoUpdate(RimIntersection* intersection)
{
m_intersections.push_back(intersection);
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -188,7 +196,7 @@ void RimIntersectionCollection::appendIntersectionBoxAndUpdate(RimIntersectionBo
updateConnectedEditors(); updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox); RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
Rim3dView* rimView = NULL; Rim3dView* rimView = nullptr;
firstAncestorOrThisOfType(rimView); firstAncestorOrThisOfType(rimView);
if (rimView) if (rimView)
{ {
@@ -196,6 +204,14 @@ void RimIntersectionCollection::appendIntersectionBoxAndUpdate(RimIntersectionBo
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::appendIntersectionBoxNoUpdate(RimIntersectionBox* intersectionBox)
{
m_intersectionBoxes.push_back(intersectionBox);
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -203,7 +219,7 @@ void RimIntersectionCollection::fieldChangedByUi(const caf::PdmFieldHandle* chan
{ {
if (changedField == &isActive) if (changedField == &isActive)
{ {
Rim3dView* rimView = NULL; Rim3dView* rimView = nullptr;
firstAncestorOrThisOfType(rimView); firstAncestorOrThisOfType(rimView);
if (rimView) if (rimView)
{ {

View File

@@ -49,8 +49,10 @@ public:
caf::PdmField<bool> isActive; caf::PdmField<bool> isActive;
void appendIntersectionAndUpdate(RimIntersection* intersection); void appendIntersectionAndUpdate(RimIntersection* intersection);
void appendIntersectionNoUpdate(RimIntersection* intersection);
void appendIntersectionBoxAndUpdate(RimIntersectionBox* intersectionBox); void appendIntersectionBoxAndUpdate(RimIntersectionBox* intersectionBox);
void appendIntersectionBoxNoUpdate(RimIntersectionBox* intersectionBox);
bool hasActiveIntersectionForSimulationWell(const RimSimWellInView* simWell) const; bool hasActiveIntersectionForSimulationWell(const RimSimWellInView* simWell) const;