mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix regressions for intersection views.
Introduced by cd08185678
Wrong scalar mappers used when coloring.
Wrong timestep used
This commit is contained in:
@@ -87,11 +87,12 @@ void RivIntersectionBoxPartMgr::updateCellResultColor( size_t timeStepIndex )
|
|||||||
RivIntersectionResultsColoringTools::updateCellResultColorStatic( timeStepIndex,
|
RivIntersectionResultsColoringTools::updateCellResultColorStatic( timeStepIndex,
|
||||||
m_rimIntersectionBox,
|
m_rimIntersectionBox,
|
||||||
m_intersectionBoxGenerator.p(),
|
m_intersectionBoxGenerator.p(),
|
||||||
|
nullptr,
|
||||||
|
nullptr,
|
||||||
m_intersectionBoxFaces.p(),
|
m_intersectionBoxFaces.p(),
|
||||||
m_intersectionBoxFacesTextureCoords.p() );
|
m_intersectionBoxFacesTextureCoords.p() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -156,6 +156,8 @@ void RivIntersectionPartMgr::updateCellResultColor( size_t
|
|||||||
RivIntersectionResultsColoringTools::updateCellResultColorStatic( timeStepIndex,
|
RivIntersectionResultsColoringTools::updateCellResultColorStatic( timeStepIndex,
|
||||||
m_rimCrossSection,
|
m_rimCrossSection,
|
||||||
m_crossSectionGenerator.p(),
|
m_crossSectionGenerator.p(),
|
||||||
|
scalarColorMapper,
|
||||||
|
ternaryColorMapper,
|
||||||
m_crossSectionFaces.p(),
|
m_crossSectionFaces.p(),
|
||||||
m_crossSectionFacesTextureCoords.p() );
|
m_crossSectionFacesTextureCoords.p() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ void RivIntersectionResultsColoringTools::updateCellResultColorStatic(
|
|||||||
size_t timeStepIndex,
|
size_t timeStepIndex,
|
||||||
RimIntersectionHandle* rimIntersectionHandle,
|
RimIntersectionHandle* rimIntersectionHandle,
|
||||||
const RivIntersectionGeometryGeneratorIF* intersectionGeomGenIF,
|
const RivIntersectionGeometryGeneratorIF* intersectionGeomGenIF,
|
||||||
|
const cvf::ScalarMapper* explicitScalarColorMapper,
|
||||||
|
const RivTernaryScalarMapper* explicitTernaryColorMapper,
|
||||||
cvf::Part* intersectionFacesPart,
|
cvf::Part* intersectionFacesPart,
|
||||||
cvf::Vec2fArray* intersectionFacesTextureCoords )
|
cvf::Vec2fArray* intersectionFacesTextureCoords )
|
||||||
{
|
{
|
||||||
@@ -66,8 +68,8 @@ void RivIntersectionResultsColoringTools::updateCellResultColorStatic(
|
|||||||
|
|
||||||
RimEclipseResultDefinition* eclipseResDef = nullptr;
|
RimEclipseResultDefinition* eclipseResDef = nullptr;
|
||||||
RimGeoMechResultDefinition* geomResultDef = nullptr;
|
RimGeoMechResultDefinition* geomResultDef = nullptr;
|
||||||
const cvf::ScalarMapper* scalarColorMapper = nullptr;
|
const cvf::ScalarMapper* scalarColorMapper = explicitScalarColorMapper;
|
||||||
const RivTernaryScalarMapper* ternaryColorMapper = nullptr;
|
const RivTernaryScalarMapper* ternaryColorMapper = explicitTernaryColorMapper;
|
||||||
|
|
||||||
// Separate intersection result
|
// Separate intersection result
|
||||||
|
|
||||||
@@ -83,9 +85,9 @@ void RivIntersectionResultsColoringTools::updateCellResultColorStatic(
|
|||||||
geomResultDef = sepResDef->geoMechResultDefinition();
|
geomResultDef = sepResDef->geoMechResultDefinition();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarColorMapper = sepResDef->regularLegendConfig()->scalarMapper();
|
if ( !scalarColorMapper ) scalarColorMapper = sepResDef->regularLegendConfig()->scalarMapper();
|
||||||
ternaryColorMapper = sepResDef->ternaryLegendConfig()->scalarMapper();
|
if ( !ternaryColorMapper ) ternaryColorMapper = sepResDef->ternaryLegendConfig()->scalarMapper();
|
||||||
timeStepIndex = sepResDef->timeStep();
|
timeStepIndex = sepResDef->timeStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ordinary result
|
// Ordinary result
|
||||||
@@ -97,10 +99,10 @@ void RivIntersectionResultsColoringTools::updateCellResultColorStatic(
|
|||||||
|
|
||||||
if ( eclipseView )
|
if ( eclipseView )
|
||||||
{
|
{
|
||||||
eclipseResDef = eclipseView->cellResult();
|
eclipseResDef = eclipseView->cellResult();
|
||||||
scalarColorMapper = eclipseView->cellResult()->legendConfig()->scalarMapper();
|
if ( !scalarColorMapper ) scalarColorMapper = eclipseView->cellResult()->legendConfig()->scalarMapper();
|
||||||
ternaryColorMapper = eclipseView->cellResult()->ternaryLegendConfig()->scalarMapper();
|
if ( !ternaryColorMapper )
|
||||||
timeStepIndex = eclipseView->currentTimeStep();
|
ternaryColorMapper = eclipseView->cellResult()->ternaryLegendConfig()->scalarMapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
RimGeoMechView* geoView;
|
RimGeoMechView* geoView;
|
||||||
@@ -108,9 +110,8 @@ void RivIntersectionResultsColoringTools::updateCellResultColorStatic(
|
|||||||
|
|
||||||
if ( geoView )
|
if ( geoView )
|
||||||
{
|
{
|
||||||
geomResultDef = geoView->cellResult();
|
geomResultDef = geoView->cellResult();
|
||||||
scalarColorMapper = geoView->cellResult()->legendConfig()->scalarMapper();
|
if ( !scalarColorMapper ) scalarColorMapper = geoView->cellResult()->legendConfig()->scalarMapper();
|
||||||
timeStepIndex = geoView->currentTimeStep();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,10 +44,12 @@ class RivIntersectionResultsColoringTools
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void updateCellResultColorStatic( size_t timeStepIndex,
|
static void updateCellResultColorStatic( size_t timeStepIndex,
|
||||||
RimIntersectionHandle* m_rimIntersectionBox,
|
RimIntersectionHandle* rimIntersectionHandle,
|
||||||
const RivIntersectionGeometryGeneratorIF* m_intersectionBoxGenerator,
|
const RivIntersectionGeometryGeneratorIF* intersectionGeomGenIF,
|
||||||
cvf::Part* m_intersectionBoxFaces,
|
const cvf::ScalarMapper* explicitScalarColorMapper,
|
||||||
cvf::Vec2fArray* m_intersectionBoxFacesTextureCoords );
|
const RivTernaryScalarMapper* explicitTernaryColorMapper,
|
||||||
|
cvf::Part* intersectionFacesPart,
|
||||||
|
cvf::Vec2fArray* intersectionFacesTextureCoords );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void updateEclipseCellResultColors( const RimEclipseResultDefinition* eclipseResDef,
|
static void updateEclipseCellResultColors( const RimEclipseResultDefinition* eclipseResDef,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include "RimGeoMechView.h"
|
#include "RimGeoMechView.h"
|
||||||
#include "RimGridView.h"
|
#include "RimGridView.h"
|
||||||
#include "RimIntersection.h"
|
#include "RimIntersection.h"
|
||||||
|
#include "RimIntersectionResultDefinition.h"
|
||||||
#include "RimRegularLegendConfig.h"
|
#include "RimRegularLegendConfig.h"
|
||||||
#include "RimSimWellInView.h"
|
#include "RimSimWellInView.h"
|
||||||
#include "RimTernaryLegendConfig.h"
|
#include "RimTernaryLegendConfig.h"
|
||||||
@@ -644,8 +645,20 @@ void Rim2dIntersectionView::onUpdateLegends()
|
|||||||
|
|
||||||
if ( eclView )
|
if ( eclView )
|
||||||
{
|
{
|
||||||
m_legendConfig()->setUiValuesFromLegendConfig( eclView->cellResult()->legendConfig() );
|
// Copy the legend settings from the real view
|
||||||
m_ternaryLegendConfig()->setUiValuesFromLegendConfig( eclView->cellResult()->ternaryLegendConfig() );
|
|
||||||
|
RimIntersectionResultDefinition* sepInterResDef = m_intersection->activeSeparateResultDefinition();
|
||||||
|
if ( sepInterResDef )
|
||||||
|
{
|
||||||
|
m_legendConfig()->setUiValuesFromLegendConfig( sepInterResDef->regularLegendConfig() );
|
||||||
|
m_ternaryLegendConfig()->setUiValuesFromLegendConfig( sepInterResDef->ternaryLegendConfig() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_legendConfig()->setUiValuesFromLegendConfig( eclView->cellResult()->legendConfig() );
|
||||||
|
m_ternaryLegendConfig()->setUiValuesFromLegendConfig( eclView->cellResult()->ternaryLegendConfig() );
|
||||||
|
}
|
||||||
|
|
||||||
eclView->cellResult()->updateLegendData( eclView->eclipseCase(),
|
eclView->cellResult()->updateLegendData( eclView->eclipseCase(),
|
||||||
m_currentTimeStep(),
|
m_currentTimeStep(),
|
||||||
m_legendConfig(),
|
m_legendConfig(),
|
||||||
@@ -669,7 +682,15 @@ void Rim2dIntersectionView::onUpdateLegends()
|
|||||||
|
|
||||||
if ( geoView )
|
if ( geoView )
|
||||||
{
|
{
|
||||||
m_legendConfig()->setUiValuesFromLegendConfig( geoView->cellResult()->legendConfig() );
|
RimIntersectionResultDefinition* sepInterResDef = m_intersection->activeSeparateResultDefinition();
|
||||||
|
if ( sepInterResDef )
|
||||||
|
{
|
||||||
|
m_legendConfig()->setUiValuesFromLegendConfig( sepInterResDef->regularLegendConfig() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_legendConfig()->setUiValuesFromLegendConfig( geoView->cellResult()->legendConfig() );
|
||||||
|
}
|
||||||
|
|
||||||
geoView->updateLegendTextAndRanges( m_legendConfig(), m_currentTimeStep() );
|
geoView->updateLegendTextAndRanges( m_legendConfig(), m_currentTimeStep() );
|
||||||
legend = m_legendConfig()->titledOverlayFrame();
|
legend = m_legendConfig()->titledOverlayFrame();
|
||||||
|
|||||||
Reference in New Issue
Block a user