#5019 Fix wrong use of explicit scalar mappers for intersections

Only 2d intersection view is supposed to use them
This commit is contained in:
Jacob Støren 2019-11-25 15:33:42 +01:00
parent baedf02ba9
commit 7aec88de3c
7 changed files with 12 additions and 21 deletions

View File

@ -150,15 +150,15 @@ void RivIntersectionPartMgr::applySingleColorEffect()
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::updateCellResultColor( size_t timeStepIndex,
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper )
const cvf::ScalarMapper* explicitScalarColorMapper,
const RivTernaryScalarMapper* explicitTernaryColorMapper )
{
RivIntersectionResultsColoringTools::updateCellResultColorStatic( timeStepIndex,
!m_isFlattened,
m_rimCrossSection,
m_crossSectionGenerator.p(),
scalarColorMapper,
ternaryColorMapper,
explicitScalarColorMapper,
explicitTernaryColorMapper,
m_crossSectionFaces.p(),
m_crossSectionFacesTextureCoords.p() );
}

View File

@ -68,8 +68,8 @@ public:
void applySingleColorEffect();
void updateCellResultColor( size_t timeStepIndex,
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper );
const cvf::ScalarMapper* explicitScalarColorMapper,
const RivTernaryScalarMapper* explicitTernaryColorMapper );
void appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
@ -113,4 +113,3 @@ private:
bool m_isFlattened;
};

View File

@ -794,9 +794,7 @@ void RimEclipseView::updateVisibleGeometriesAndCellColors()
if ( ( this->hasUserRequestedAnimation() && this->cellResult()->hasResult() ) ||
this->cellResult()->isTernarySaturationSelected() )
{
m_crossSectionCollection->updateCellResultColor( m_currentTimeStep,
this->cellResult()->legendConfig()->scalarMapper(),
this->cellResult()->ternaryLegendConfig()->scalarMapper() );
m_crossSectionCollection->updateCellResultColor( m_currentTimeStep );
}
else
{

View File

@ -580,7 +580,7 @@ QString RimGeoMechResultDefinition::diffResultUiShortName() const
//--------------------------------------------------------------------------------------------------
RigGeoMechCaseData* RimGeoMechResultDefinition::ownerCaseData() const
{
return m_geomCase->geoMechData();
return m_geomCase ? m_geomCase->geoMechData() : nullptr;
}
//--------------------------------------------------------------------------------------------------

View File

@ -384,9 +384,7 @@ void RimGeoMechView::onUpdateDisplayModelForCurrentTimeStep()
if ( this->cellResult()->hasResult() )
{
m_crossSectionCollection->updateCellResultColor( m_currentTimeStep,
this->cellResult()->legendConfig()->scalarMapper(),
nullptr );
m_crossSectionCollection->updateCellResultColor( m_currentTimeStep );
}
else
{

View File

@ -97,9 +97,7 @@ void RimIntersectionCollection::applySingleColorEffect()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::updateCellResultColor( size_t timeStepIndex,
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper )
void RimIntersectionCollection::updateCellResultColor( size_t timeStepIndex )
{
if ( !this->isActive() ) return;
@ -107,7 +105,7 @@ void RimIntersectionCollection::updateCellResultColor( size_t
{
if ( cs->isActive() )
{
cs->intersectionPartMgr()->updateCellResultColor( timeStepIndex, scalarColorMapper, ternaryColorMapper );
cs->intersectionPartMgr()->updateCellResultColor( timeStepIndex, nullptr, nullptr );
}
}

View File

@ -69,9 +69,7 @@ public:
// Visualization interface
void applySingleColorEffect();
void updateCellResultColor( size_t timeStepIndex,
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper );
void updateCellResultColor( size_t timeStepIndex );
void appendPartsToModel( Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void rebuildGeometry();