mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#815 Initialize intersection boxes after loading of case
This commit is contained in:
parent
3d83d32055
commit
61b7a6c57d
@ -706,6 +706,8 @@ void RimEclipseView::loadDataAndUpdate()
|
||||
this->faultCollection()->setReservoirView(this);
|
||||
this->faultCollection()->syncronizeFaults();
|
||||
|
||||
this->intersectionBoxCollection()->initialize();
|
||||
|
||||
m_reservoirGridPartManager->clearGeometryCache();
|
||||
|
||||
syncronizeWellsWithResults();
|
||||
|
@ -163,6 +163,8 @@ void RimGeoMechView::loadDataAndUpdate()
|
||||
updateViewerWidget();
|
||||
|
||||
this->geoMechPropertyFilterCollection()->loadAndInitializePropertyFilters();
|
||||
|
||||
this->intersectionBoxCollection()->initialize();
|
||||
|
||||
this->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "RivIntersectionBoxPartMgr.h"
|
||||
|
||||
#include "cafPdmUiSliderEditor.h"
|
||||
#include "RimCase.h"
|
||||
|
||||
|
||||
|
||||
@ -97,9 +98,35 @@ void RimIntersectionBox::setModelBoundingBox(cvf::BoundingBox& boundingBox)
|
||||
maxXCoord = cvf::Math::ceil(boundingBox.max().x());
|
||||
maxYCoord = cvf::Math::ceil(boundingBox.max().y());
|
||||
maxZCoord = cvf::Math::ceil(boundingBox.max().z());
|
||||
|
||||
updateLabelsFromBoundingBox();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::updateLabelsFromBoundingBox()
|
||||
{
|
||||
{
|
||||
QString range = QString(" [%1 - %2]").arg(m_boundingBox.min().x()).arg(m_boundingBox.max().x());
|
||||
minXCoord.uiCapability()->setUiName(QString("Min X") + range);
|
||||
maxXCoord.uiCapability()->setUiName(QString("Min X") + range);
|
||||
}
|
||||
|
||||
{
|
||||
QString range = QString(" [%1 - %2]").arg(m_boundingBox.min().y()).arg(m_boundingBox.max().y());
|
||||
minYCoord.uiCapability()->setUiName(QString("Min Y") + range);
|
||||
maxYCoord.uiCapability()->setUiName(QString("Min Y") + range);
|
||||
}
|
||||
|
||||
{
|
||||
QString range = QString(" [%1 - %2]").arg(m_boundingBox.min().z()).arg(m_boundingBox.max().z());
|
||||
minZCoord.uiCapability()->setUiName(QString("Min Z") + range);
|
||||
maxZCoord.uiCapability()->setUiName(QString("Min Z") + range);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -110,6 +137,21 @@ RivIntersectionBoxPartMgr* RimIntersectionBox::intersectionBoxPartMgr()
|
||||
return m_intersectionBoxPartMgr.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::initialize()
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
firstAnchestorOrThisOfType(rimCase);
|
||||
if (rimCase)
|
||||
{
|
||||
m_boundingBox = rimCase->activeCellsBoundingBox();
|
||||
}
|
||||
|
||||
updateLabelsFromBoundingBox();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -155,12 +197,23 @@ void RimIntersectionBox::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
|
||||
{
|
||||
uiOrdering.add(&name);
|
||||
|
||||
/*
|
||||
uiOrdering.add(&minXCoord);
|
||||
uiOrdering.add(&maxXCoord);
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("X Coordinates");
|
||||
group->add(&minXCoord);
|
||||
group->add(&maxXCoord);
|
||||
}
|
||||
|
||||
uiOrdering.setForgetRemainingFields(true);
|
||||
*/
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Y Coordinates");
|
||||
group->add(&minYCoord);
|
||||
group->add(&maxYCoord);
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Z Coordinates");
|
||||
group->add(&minZCoord);
|
||||
group->add(&maxZCoord);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -47,9 +47,11 @@ public:
|
||||
|
||||
RivIntersectionBoxPartMgr* intersectionBoxPartMgr();
|
||||
|
||||
|
||||
void initialize();
|
||||
void setModelBoundingBox(cvf::BoundingBox& boundingBox);
|
||||
|
||||
void updateLabelsFromBoundingBox();
|
||||
|
||||
protected:
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
@ -176,3 +176,14 @@ bool RimIntersectionBoxCollection::hasActiveCrossSectionForSimulationWell(RimEcl
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBoxCollection::initialize()
|
||||
{
|
||||
for (auto intersectionBox : m_intersectionBoxes())
|
||||
{
|
||||
intersectionBox->initialize();
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ public:
|
||||
|
||||
bool hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const;
|
||||
|
||||
void initialize();
|
||||
|
||||
// Visualization interface
|
||||
|
||||
void applySingleColorEffect();
|
||||
|
Loading…
Reference in New Issue
Block a user