Hide seismic section folder in views if no seismic data is loaded

This commit is contained in:
jonjenssen
2023-04-21 17:22:06 +02:00
committed by jonjenssen
parent 0e7cf49b17
commit dea931cb25
6 changed files with 37 additions and 3 deletions

View File

@@ -258,3 +258,14 @@ void RimSeismicSectionCollection::updateView()
firstAncestorOrThisOfType( view );
if ( view ) view->scheduleCreateDisplayModelAndRedraw();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimSeismicSectionCollection::shouldBeVisibleInTree() const
{
RimProject* proj = RimProject::current();
if ( proj == nullptr ) return false;
return !proj->activeOilField()->seismicCollection()->isEmpty();
}