#4529 Remove nextValidId fields and calculate on the fly

Remove cached next-valid-ID member variables and compute them on demand
by scanning existing objects, following the pattern already used by
RimUserDefinedCalculationCollection. This eliminates unnecessary state
and potential corruption risks.

Fixes #4529.
This commit is contained in:
Kristian Bendiksen committed 2026-03-30 17:03:06 +02:00
1 parent 2374301385
commit 5921c44be0
6 files changed
+52 -71

No files matched your search

@@ -228,13 +228,6 @@ private:
caf::PdmField<caf::AppEnum<RiaDefines::WindowTileMode>> m_subWindowsTileMode3DWindow;
caf::PdmField<caf::AppEnum<RiaDefines::WindowTileMode>> m_subWindowsTileModePlotWindow;
int m_nextValidCaseId;
int m_nextValidCaseGroupId;
int m_nextValidViewId;
int m_nextValidPlotId;
int m_nextValidSummaryCaseId;
int m_nextValidEnsembleId;
caf::PdmChildArrayField<RimEclipseCase*> casesObsolete; // obsolete
caf::PdmChildArrayField<RimIdenticalGridCaseGroup*> caseGroupsObsolete; // obsolete
};