#2369 Elm props: Clear cell results on deletion

This commit is contained in:
Rebecca Cox
2018-01-15 14:48:05 +01:00
parent 277bd496f1
commit 4bf8de2787
5 changed files with 32 additions and 9 deletions
@@ -87,6 +87,13 @@ std::map<std::string, std::vector<std::string>> RifElementPropertyReader::scalar
std::map<std::string, std::vector<float>>
RifElementPropertyReader::readAllElementPropertiesInFileContainingField(const std::string& fieldName)
{
std::map<std::string, std::vector<float>> fieldAndData;
if (m_fieldsMetaData.find(fieldName) == m_fieldsMetaData.end())
{
return fieldAndData;
}
RifElementPropertyTable table;
RifElementPropertyTableReader::readData(&m_fieldsMetaData[fieldName], &table);
@@ -97,8 +104,6 @@ std::map<std::string, std::vector<float>>
CVF_ASSERT(table.data[i].size() == table.elementIds.size());
}
std::map<std::string, std::vector<float>> fieldAndData;
const std::vector<int>& elementIdsFromFile = table.elementIds;
if (elementIdsFromFile == m_elementIdxToId)