Merge remote-tracking branch 'origin/2018.01.01-patch' into dev

This commit is contained in:
Rebecca Cox 2018-01-24 10:56:10 +01:00
commit 97aab5bda5
12 changed files with 25 additions and 15 deletions

View File

@ -100,7 +100,7 @@ void RicAppendIntersectionFeatureCmd::redo()
RimIntersection* intersection = new RimIntersection();
intersection->name = QString("Intersection");
m_intersectionCollection->appendIntersection(intersection);
m_intersectionCollection->appendIntersectionAndUpdate(intersection);
RimGridView* view = nullptr;
m_intersectionCollection->firstAncestorOrThisOfTypeAsserted(view);

View File

@ -122,7 +122,7 @@ void RicNewAzimuthDipIntersectionFeatureCmd::redo()
intersection->setLengthDown(cvf::Math::floor(bBox.extent()[2] / 2));
}
m_intersectionCollection->appendIntersection(intersection);
m_intersectionCollection->appendIntersectionAndUpdate(intersection);
RiuSelectionManager::instance()->deleteAllItems();
RiuMainWindow::instance()->selectAsCurrentItem(intersection);

View File

@ -112,7 +112,7 @@ void RicNewPolylineIntersectionFeatureCmd::redo()
intersection->type = RimIntersection::CS_POLYLINE;
intersection->inputPolyLineFromViewerEnabled = true;
m_intersectionCollection->appendIntersection(intersection);
m_intersectionCollection->appendIntersectionAndUpdate(intersection);
RiuSelectionManager::instance()->deleteAllItems();

View File

@ -107,7 +107,7 @@ void RicNewSimWellIntersectionCmd::redo()
intersection->type = RimIntersection::CS_SIMULATION_WELL;
intersection->simulationWell = m_simWell;
m_intersectionCollection->appendIntersection(intersection);
m_intersectionCollection->appendIntersectionAndUpdate(intersection);
}
//--------------------------------------------------------------------------------------------------

View File

@ -116,7 +116,7 @@ void RicNewWellPathIntersectionFeatureCmd::redo()
intersection->type = RimIntersection::CS_WELL_PATH;
intersection->wellPath = m_wellPath;
m_intersectionCollection->appendIntersection(intersection);
m_intersectionCollection->appendIntersectionAndUpdate(intersection);
}
//--------------------------------------------------------------------------------------------------

View File

@ -56,7 +56,7 @@ void RicAppendIntersectionBoxFeature::onActionTriggered(bool isChecked)
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString("Intersection Box");
coll->appendIntersectionBox(intersectionBox);
coll->appendIntersectionBoxAndUpdate(intersectionBox);
intersectionBox->setToDefaultSizeBox();

View File

@ -59,7 +59,7 @@ void RicIntersectionBoxAtPosFeature::onActionTriggered(bool isChecked)
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString("Intersection box");
coll->appendIntersectionBox(intersectionBox);
coll->appendIntersectionBoxAndUpdate(intersectionBox);
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice(RimIntersectionBox::PLANE_STATE_NONE, domainCoord);

View File

@ -59,7 +59,7 @@ void RicIntersectionBoxXSliceFeature::onActionTriggered(bool isChecked)
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString("X-slice (Intersection box)");
coll->appendIntersectionBox(intersectionBox);
coll->appendIntersectionBoxAndUpdate(intersectionBox);
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice(RimIntersectionBox::PLANE_STATE_X, domainCoord);

View File

@ -59,7 +59,7 @@ void RicIntersectionBoxYSliceFeature::onActionTriggered(bool isChecked)
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString("Y-slice (Intersection box)");
coll->appendIntersectionBox(intersectionBox);
coll->appendIntersectionBoxAndUpdate(intersectionBox);
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice(RimIntersectionBox::PLANE_STATE_Y, domainCoord);

View File

@ -59,7 +59,7 @@ void RicIntersectionBoxZSliceFeature::onActionTriggered(bool isChecked)
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString("Z-slice (Intersection box)");
coll->appendIntersectionBox(intersectionBox);
coll->appendIntersectionBoxAndUpdate(intersectionBox);
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice(RimIntersectionBox::PLANE_STATE_Z, domainCoord);

View File

@ -151,7 +151,7 @@ void RimIntersectionCollection::appendPartsToModel(cvf::ModelBasicList* model, c
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::appendIntersection(RimIntersection* intersection)
void RimIntersectionCollection::appendIntersectionAndUpdate(RimIntersection* intersection)
{
m_intersections.push_back(intersection);
@ -181,9 +181,19 @@ void RimIntersectionCollection::syncronize2dIntersectionViews()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::appendIntersectionBox(RimIntersectionBox* intersectionBox)
void RimIntersectionCollection::appendIntersectionBoxAndUpdate(RimIntersectionBox* intersectionBox)
{
m_intersectionBoxes.push_back(intersectionBox);
updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
Rim3dView* rimView = NULL;
firstAncestorOrThisOfType(rimView);
if (rimView)
{
rimView->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -48,9 +48,9 @@ public:
caf::PdmField<bool> isActive;
void appendIntersection(RimIntersection* intersection);
void appendIntersectionBox(RimIntersectionBox* intersectionBox);
void appendIntersectionAndUpdate(RimIntersection* intersection);
void appendIntersectionBoxAndUpdate(RimIntersectionBox* intersectionBox);
bool hasActiveIntersectionForSimulationWell(const RimSimWellInView* simWell) const;