mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
@@ -59,26 +59,11 @@ void RicIntersectionBoxYSliceFeature::onActionTriggered(bool isChecked)
|
||||
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
|
||||
intersectionBox->name = QString("Y-slice (Intersection box)");
|
||||
|
||||
RimCase* rimCase = NULL;
|
||||
coll->firstAnchestorOrThisOfType(rimCase);
|
||||
if (rimCase)
|
||||
{
|
||||
intersectionBox->setModelBoundingBox(rimCase->activeCellsBoundingBox());
|
||||
|
||||
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
|
||||
|
||||
if (!domainCoord.isUndefined())
|
||||
{
|
||||
intersectionBox->setYSlice(domainCoord.y());
|
||||
}
|
||||
else
|
||||
{
|
||||
intersectionBox->setYSlice(rimCase->activeCellsBoundingBox().center().y());
|
||||
}
|
||||
}
|
||||
|
||||
coll->appendIntersectionBox(intersectionBox);
|
||||
|
||||
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
|
||||
intersectionBox->setToDefaultSizeSlice(RimIntersectionBox::PLANE_STATE_Y, domainCoord);
|
||||
|
||||
coll->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user