Release 2023.06

This commit is contained in:
Magne Sjaastad
2023-06-19 13:48:44 +02:00
committed by GitHub
parent a7108f0a09
commit 77bf792b1a
1390 changed files with 66974 additions and 11511 deletions

View File

@@ -150,8 +150,8 @@ Rim3dView::Rim3dView()
CAF_PDM_InitFieldNoDefault( &m_fontSize, "FontSize", "Font Size" );
m_intersectionVizModel = new cvf::ModelBasicList;
m_intersectionVizModel->setName( "CrossSectionModel" );
m_seismicVizModel = new cvf::ModelBasicList;
m_seismicVizModel->setName( "SeismicSectionModel" );
m_highlightVizModel = new cvf::ModelBasicList;
m_highlightVizModel->setName( "HighlightModel" );
@@ -459,8 +459,7 @@ RimViewLinker* Rim3dView::assosiatedViewLinker() const
//--------------------------------------------------------------------------------------------------
RimViewController* Rim3dView::viewController() const
{
std::vector<RimViewController*> objects;
this->objectsWithReferringPtrFieldsOfType( objects );
std::vector<RimViewController*> objects = objectsWithReferringPtrFieldsOfType<RimViewController>();
for ( auto v : objects )
{
@@ -558,9 +557,7 @@ void Rim3dView::scheduleCreateDisplayModelAndRedraw()
std::set<Rim3dView*> Rim3dView::viewsUsingThisAsComparisonView()
{
std::set<Rim3dView*> containingViews;
std::vector<caf::PdmFieldHandle*> fieldsReferringToMe;
this->referringPtrFields( fieldsReferringToMe );
std::vector<caf::PdmFieldHandle*> fieldsReferringToMe = referringPtrFields();
for ( caf::PdmFieldHandle* field : fieldsReferringToMe )
{
if ( field->keyword() == m_comparisonView.keyword() )
@@ -812,8 +809,7 @@ bool Rim3dView::hasVisibleTimeStepDependent3dWellLogCurves() const
{
if ( wellPathCollection() )
{
std::vector<Rim3dWellLogCurve*> wellLogCurves;
wellPathCollection()->descendantsIncludingThisOfType( wellLogCurves );
std::vector<Rim3dWellLogCurve*> wellLogCurves = wellPathCollection()->descendantsIncludingThisOfType<Rim3dWellLogCurve>();
for ( const Rim3dWellLogCurve* curve : wellLogCurves )
{
if ( curve->showInView( this ) && curve->isShowingTimeDependentResult() )
@@ -993,8 +989,7 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const
{
if ( changedField == &m_fontSize )
{
std::vector<caf::FontHolderInterface*> fontHolderChildren;
descendantsOfType( fontHolderChildren );
auto fontHolderChildren = descendantsOfType<caf::FontHolderInterface>();
for ( auto fontHolder : fontHolderChildren )
{
fontHolder->updateFonts();
@@ -1069,8 +1064,7 @@ void Rim3dView::addAnnotationsToModel( cvf::ModelBasicList* annotationsModel )
{
if ( !this->ownerCase() ) return;
std::vector<RimAnnotationInViewCollection*> annotationCollections;
descendantsIncludingThisOfType( annotationCollections );
auto annotationCollections = descendantsIncludingThisOfType<RimAnnotationInViewCollection>();
if ( annotationCollections.empty() || !annotationCollections.front()->isActive() )
{
@@ -1115,7 +1109,7 @@ void Rim3dView::addMeasurementToModel( cvf::ModelBasicList* measureModel )
{
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
cvf::Camera* mainOrComparisonCamera = isUsingOverrideViewer() ? nativeOrOverrideViewer()->comparisonMainCamera()
: nativeOrOverrideViewer()->mainCamera();
: nativeOrOverrideViewer()->mainCamera();
m_measurementPartManager->appendGeometryPartsToModel( mainOrComparisonCamera,
measureModel,
transForm.p(),
@@ -1142,14 +1136,15 @@ bool Rim3dView::isMasterView() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::updateGridBoxData()
cvf::BoundingBox Rim3dView::domainBoundingBox()
{
cvf::BoundingBox combinedDomainBBox;
if ( viewer() && ownerCase() )
{
using BBox = cvf::BoundingBox;
BBox masterDomainBBox = isShowingActiveCellsOnly() ? ownerCase()->activeCellsBoundingBox() : ownerCase()->allCellsBoundingBox();
BBox combinedDomainBBox = masterDomainBBox;
cvf::BoundingBox masterDomainBBox = isShowingActiveCellsOnly() ? ownerCase()->activeCellsBoundingBox()
: ownerCase()->allCellsBoundingBox();
combinedDomainBBox.add( masterDomainBBox );
if ( Rim3dView* depView = activeComparisonView() )
{
@@ -1159,17 +1154,25 @@ void Rim3dView::updateGridBoxData()
if ( destinationOwnerCase )
{
BBox depDomainBBox = depView->isShowingActiveCellsOnly() ? destinationOwnerCase->activeCellsBoundingBox()
: destinationOwnerCase->allCellsBoundingBox();
if ( depDomainBBox.isValid() )
{
combinedDomainBBox.add( depDomainBBox.min() );
combinedDomainBBox.add( depDomainBBox.max() );
}
cvf::BoundingBox depDomainBBox = depView->isShowingActiveCellsOnly() ? destinationOwnerCase->activeCellsBoundingBox()
: destinationOwnerCase->allCellsBoundingBox();
combinedDomainBBox.add( depDomainBBox );
}
}
}
viewer()->updateGridBoxData( m_scaleZ(), ownerCase()->displayModelOffset(), backgroundColor(), combinedDomainBBox, fontSize() );
return combinedDomainBBox;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::updateGridBoxData()
{
if ( viewer() && ownerCase() )
{
viewer()->updateGridBoxData( m_scaleZ(), ownerCase()->displayModelOffset(), backgroundColor(), domainBoundingBox(), fontSize() );
}
}
@@ -1485,8 +1488,7 @@ QList<caf::PdmOptionItemInfo> Rim3dView::calculateValueOptions( const caf::PdmFi
if ( fieldNeedingOptions == &m_comparisonView )
{
RimProject* proj;
this->firstAncestorOrThisOfType( proj );
RimProject* proj = RimProject::current();
if ( proj )
{
std::vector<Rim3dView*> views;
@@ -1739,8 +1741,7 @@ void Rim3dView::restoreComparisonView()
//--------------------------------------------------------------------------------------------------
RimViewLinker* Rim3dView::viewLinkerIfMasterView() const
{
std::vector<RimViewLinker*> objects;
this->objectsWithReferringPtrFieldsOfType( objects );
std::vector<RimViewLinker*> objects = objectsWithReferringPtrFieldsOfType<RimViewLinker>();
for ( auto viewLinker : objects )
{