mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2426 Add working legends to 2D intersection Views. Refactor to make legend update code work from a separate view with separate legend configs. Make sure legend and results are updated as the main view is updated. Adjust legendconfig->setTitle to use QString
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "RimIntersectionCollection.h"
|
||||
|
||||
#include "Rim2dIntersectionViewCollection.h"
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "Rim3dView.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimIntersection.h"
|
||||
@@ -95,7 +96,9 @@ void RimIntersectionCollection::applySingleColorEffect()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::updateCellResultColor(size_t timeStepIndex)
|
||||
void RimIntersectionCollection::updateCellResultColor(size_t timeStepIndex,
|
||||
const cvf::ScalarMapper* scalarColorMapper,
|
||||
const RivTernaryScalarMapper* ternaryColorMapper)
|
||||
{
|
||||
if(!this->isActive()) return;
|
||||
|
||||
@@ -103,7 +106,7 @@ void RimIntersectionCollection::updateCellResultColor(size_t timeStepIndex)
|
||||
{
|
||||
if(cs->isActive)
|
||||
{
|
||||
cs->intersectionPartMgr()->updateCellResultColor(timeStepIndex);
|
||||
cs->intersectionPartMgr()->updateCellResultColor(timeStepIndex, scalarColorMapper, ternaryColorMapper);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +189,17 @@ void RimIntersectionCollection::syncronize2dIntersectionViews()
|
||||
ownerCase->intersectionViewCollection()->syncFromExistingIntersections(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::scheduleCreateDisplayModelAndRedraw2dIntersectionViews()
|
||||
{
|
||||
for (RimIntersection* isection: m_intersections)
|
||||
{
|
||||
isection->correspondingIntersectionView()->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user