mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5285 Visualization and update of Surfaces
This commit is contained in:
@@ -91,7 +91,7 @@ RimSurface* RimSurfaceCollection::importSurfacesFromFiles( const QStringList& fi
|
||||
newSurface->setSurfaceFilePath( newFileName );
|
||||
newSurface->setColor( newColor );
|
||||
|
||||
if ( !newSurface->updateDataFromFile() )
|
||||
if ( !newSurface->updateSurfaceDataFromFile() )
|
||||
{
|
||||
delete newSurface;
|
||||
errorMessages += newFileName + "\n";
|
||||
@@ -132,20 +132,36 @@ std::vector<RimSurface*> RimSurfaceCollection::surfaces() const
|
||||
return m_surfaces.childObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSurfaceCollection::loadData()
|
||||
{
|
||||
for ( auto surf : m_surfaces )
|
||||
{
|
||||
if ( !surf->updateSurfaceDataFromFile() )
|
||||
{
|
||||
// Error: could not open the surface file surf->surfaceFilePath();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSurfaceCollection::updateViews( const std::vector<RimSurface*>& surfsToReload )
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
std::vector<RimGridView*> views;
|
||||
proj->allVisibleGridViews( views );
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
std::vector<Rim3dView*> views;
|
||||
proj->allViews( views );
|
||||
|
||||
// Make sure the tree items are syncronized
|
||||
|
||||
for ( auto view : views )
|
||||
{
|
||||
view->updateSurfacesInViewTreeItems();
|
||||
auto gridView = dynamic_cast<RimGridView*>( view );
|
||||
if ( gridView ) gridView->updateSurfacesInViewTreeItems();
|
||||
}
|
||||
|
||||
std::set<RimGridView*> viewsNeedingUpdate;
|
||||
|
||||
Reference in New Issue
Block a user