#8078 Intersections: Improve names of surface items

This commit is contained in:
Magne Sjaastad
2021-10-05 14:23:20 +02:00
parent 25c993b020
commit 5596ff28aa
3 changed files with 25 additions and 18 deletions

View File

@@ -456,7 +456,7 @@ void RimEclipseView::onCreateDisplayModel()
else if ( this->cellResult()->hasStaticResult() || this->cellEdgeResult()->hasResult() ||
this->eclipsePropertyFilterCollection()->hasActiveFilters() ||
this->intersectionCollection()->hasAnyActiveSeparateResults() ||
this->surfaceInViewCollection()->hasAnyActiveSeparateResults() )
( this->surfaceInViewCollection() && this->surfaceInViewCollection()->hasAnyActiveSeparateResults() ) )
{
// The one and only static result entry
timeStepIndices.push_back( 0 );

View File

@@ -257,17 +257,24 @@ QString RimSurfaceIntersectionBand::objectName() const
{
QString text;
auto firstSurface = surfaces[0];
RimSurfaceCollection* surfColl = nullptr;
firstSurface->firstAncestorOfType( surfColl );
if ( surfColl )
auto firstSurface = surfaces[0];
if ( firstSurface )
{
text += surfColl->collectionName();
RimSurfaceCollection* surfColl = nullptr;
firstSurface->firstAncestorOfType( surfColl );
if ( surfColl )
{
text += surfColl->collectionName();
}
}
if ( surfaces[0] )
text += "( " + surfaces[0]->userDescription() + " - " + surfaces[1]->userDescription() + " )";
return text;
auto secondSurface = surfaces[0];
if ( firstSurface && secondSurface )
{
text += "( " + firstSurface->fullName() + " - " + secondSurface->fullName() + " )";
return text;
}
}
return "Surface Band";

View File

@@ -128,17 +128,17 @@ QString RimSurfaceIntersectionCurve::objectName() const
{
if ( m_surface1() )
{
QString text;
RimSurfaceCollection* surfColl = nullptr;
m_surface1()->firstAncestorOfType( surfColl );
if ( surfColl )
RimEnsembleSurface* ensembleSurface = nullptr;
m_surface1()->firstAncestorOfType( ensembleSurface );
if ( ensembleSurface )
{
text += surfColl->collectionName();
QString text;
text += ensembleSurface->collectionName();
text += "( " + m_surface1()->fullName() + " )";
return text;
}
if ( m_surface1() ) text += "( " + m_surface1()->userDescription() + " )";
return text;
return m_surface1()->fullName();
}
return "Surface Curve";
@@ -160,7 +160,7 @@ void RimSurfaceIntersectionCurve::appendOptionItemsForSources( int
for ( auto surf : currentCollection->surfaces() )
{
auto itemInfo = caf::PdmOptionItemInfo( surf->userDescription(), surf, false, surfaceIcon );
auto itemInfo = caf::PdmOptionItemInfo( surf->fullName(), surf, false, surfaceIcon );
itemInfo.setLevel( currentLevel + 1 );
options.push_back( itemInfo );
}