Fixed assert on open old projectfiles

The cause was that a case was inserted into a field without removing it from the old obsolete field first.
This commit is contained in:
Jacob Støren 2015-09-01 17:04:08 +02:00
parent 8b5ea1aeb3
commit c35e3fceaf

View File

@ -273,9 +273,10 @@ void RimProject::initAfterRead()
bool movedOneRimCase = false;
for (size_t cIdx = 0; cIdx < casesObsolete().size(); ++cIdx)
{
RimEclipseCase* sourceCase = casesObsolete[cIdx];
if (analysisModels)
{
RimEclipseCase* sourceCase = casesObsolete[cIdx];
casesObsolete.set(cIdx, NULL);
analysisModels->cases.push_back(sourceCase);
//printf("Moved m_project->casesObsolete[%i] to first oil fields analysis models\n", cIdx);
movedOneRimCase = true; // moved at least one so assume the others will be moved too...