mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed an assert and wrong behavior:
When selecting a result field "heading", after selecting one of its components.
This commit is contained in:
parent
948f4d5d58
commit
00f8743cef
@ -89,7 +89,9 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult(in
|
||||
// We need to read the data as bulk fields, and populate the correct scalar caches
|
||||
|
||||
std::vector< RigFemResultAddress> resultAddressOfComponents = this->getResAddrToComponentsToRead(resVarAddr);
|
||||
//
|
||||
|
||||
if (resultAddressOfComponents.size())
|
||||
{
|
||||
std::vector<RigFemScalarResultFrames*> resultsForEachComponent;
|
||||
for (size_t cIdx = 0; cIdx < resultAddressOfComponents.size(); ++cIdx)
|
||||
{
|
||||
@ -131,6 +133,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult(in
|
||||
|
||||
// Now fetch the particular component requested, which should now exist and be read.
|
||||
frames = m_femPartResults[partIndex]->findScalarResult(resVarAddr);
|
||||
}
|
||||
|
||||
if (!frames)
|
||||
{
|
||||
@ -456,10 +459,13 @@ std::vector< RigFemResultAddress> RigFemPartResultsCollection::getResAddrToCompo
|
||||
if (fcIt != fieldAndComponentNames.end())
|
||||
{
|
||||
std::vector<std::string> compNames = fcIt->second;
|
||||
if (resVarAddr.componentName != "") // If we did not request a particular component, do not add the components
|
||||
{
|
||||
for (size_t cIdx = 0; cIdx < compNames.size(); ++cIdx)
|
||||
{
|
||||
resAddressToComponents.push_back(RigFemResultAddress(resVarAddr.resultPosType, resVarAddr.fieldName, compNames[cIdx]));
|
||||
}
|
||||
}
|
||||
|
||||
if (compNames.size() == 0) // This is a scalar field. Add one component named ""
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user