#3214 Use template function to get referencing objects of specified type

This commit is contained in:
Magne Sjaastad
2018-08-15 12:55:45 +02:00
parent 97c3b9efea
commit 59f9d189e5
8 changed files with 45 additions and 58 deletions

View File

@@ -112,16 +112,16 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile(const QStringList& file
// Replace all occurrences of file sum with ecl sum
std::vector<caf::PdmObjectHandle*> referringObjects;
existingFileSummaryCase->objectsWithReferringPtrFields(referringObjects);
std::vector<RimSummaryCurve*> objects;
existingFileSummaryCase->objectsWithReferringPtrFieldsOfType(objects);
// UI settings of a curve filter is updated based
// on the new case association for the curves in the curve filter
// UI is updated by loadDataAndUpdate()
for (caf::PdmObjectHandle* objHandle : referringObjects)
for (RimSummaryCurve* summaryCurve : objects)
{
RimSummaryCurve* summaryCurve = dynamic_cast<RimSummaryCurve*>(objHandle);
if (summaryCurve)
{
RimSummaryCurveCollection* parentCollection = nullptr;