mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#829 Show formation colors for all time steps
This commit is contained in:
parent
f057f684b1
commit
0f88475fd8
@ -644,6 +644,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
|
||||
if (resVarAddr.resultPosType == RIG_FORMATION_NAMES)
|
||||
{
|
||||
RigFemScalarResultFrames* resFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr);
|
||||
resFrames->setSingleFrameResultData();
|
||||
|
||||
const RigFemPart * femPart = m_femParts->part(partIndex);
|
||||
std::vector<float>& dstFrameData = resFrames->frameData(0);
|
||||
|
@ -28,6 +28,7 @@
|
||||
RigFemScalarResultFrames::RigFemScalarResultFrames(int frameCount)
|
||||
{
|
||||
m_dataForEachFrame.resize(frameCount);
|
||||
m_singleFrameResultData = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -38,6 +39,14 @@ RigFemScalarResultFrames::~RigFemScalarResultFrames()
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemScalarResultFrames::setSingleFrameResultData()
|
||||
{
|
||||
m_singleFrameResultData = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -52,5 +61,12 @@ int RigFemScalarResultFrames::frameCount()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<float>& RigFemScalarResultFrames::frameData(size_t frameIndex)
|
||||
{
|
||||
return m_dataForEachFrame[frameIndex];
|
||||
if (m_singleFrameResultData)
|
||||
{
|
||||
return m_dataForEachFrame[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_dataForEachFrame[frameIndex];
|
||||
}
|
||||
}
|
||||
|
@ -33,9 +33,12 @@ public:
|
||||
RigFemScalarResultFrames(int frameCount);
|
||||
virtual ~RigFemScalarResultFrames();
|
||||
|
||||
void setSingleFrameResultData();
|
||||
|
||||
std::vector<float>& frameData(size_t frameIndex);
|
||||
int frameCount();
|
||||
|
||||
private:
|
||||
std::vector< std::vector<float> > m_dataForEachFrame;
|
||||
bool m_singleFrameResultData;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user