mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Always move views from obsolete fields into view collection
The original code caused ProjectFiles2024Tests\TestCase_GridCalculations to fail
This commit is contained in:
parent
55c0e81d9e
commit
3cd80f0871
@ -279,31 +279,28 @@ void RimEclipseCase::initAfterRead()
|
||||
{
|
||||
RimCase::initAfterRead();
|
||||
|
||||
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2024.03.0" ) )
|
||||
// Move views to view collection.
|
||||
RimEclipseViewCollection* viewColl = viewCollection();
|
||||
for ( RimEclipseView* riv : m_reservoirViews_OBSOLETE.childrenByType() )
|
||||
{
|
||||
// Move views to view collection.
|
||||
RimEclipseViewCollection* viewColl = viewCollection();
|
||||
for ( RimEclipseView* riv : m_reservoirViews_OBSOLETE.childrenByType() )
|
||||
{
|
||||
CVF_ASSERT( riv );
|
||||
riv->setEclipseCase( this );
|
||||
m_reservoirViews_OBSOLETE.removeChild( riv );
|
||||
viewColl->addView( riv );
|
||||
}
|
||||
|
||||
m_reservoirViews_OBSOLETE.clearWithoutDelete();
|
||||
|
||||
// Move contour maps
|
||||
auto mapViewColl = contourMapCollection();
|
||||
for ( RimEclipseContourMapView* contourMap : m_contourMapCollection_OBSOLETE->views() )
|
||||
{
|
||||
contourMap->setEclipseCase( this );
|
||||
m_contourMapCollection_OBSOLETE->removeChild( contourMap );
|
||||
mapViewColl->addView( contourMap );
|
||||
}
|
||||
|
||||
m_contourMapCollection_OBSOLETE->clearWithoutDelete();
|
||||
CVF_ASSERT( riv );
|
||||
riv->setEclipseCase( this );
|
||||
m_reservoirViews_OBSOLETE.removeChild( riv );
|
||||
viewColl->addView( riv );
|
||||
}
|
||||
|
||||
m_reservoirViews_OBSOLETE.clearWithoutDelete();
|
||||
|
||||
// Move contour maps
|
||||
auto mapViewColl = contourMapCollection();
|
||||
for ( RimEclipseContourMapView* contourMap : m_contourMapCollection_OBSOLETE->views() )
|
||||
{
|
||||
contourMap->setEclipseCase( this );
|
||||
m_contourMapCollection_OBSOLETE->removeChild( contourMap );
|
||||
mapViewColl->addView( contourMap );
|
||||
}
|
||||
|
||||
m_contourMapCollection_OBSOLETE->clearWithoutDelete();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user