#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:
Jacob Støren
2018-02-01 17:45:22 +01:00
parent a4eb16883b
commit 29ac24f3dd
29 changed files with 428 additions and 225 deletions

View File

@@ -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();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------