#8849 Data Sources : Add append curves to plot based on selection

This commit is contained in:
Magne Sjaastad
2022-04-28 09:03:40 +02:00
parent 5d9f7b165c
commit b030e617c6
8 changed files with 157 additions and 22 deletions

View File

@@ -106,18 +106,7 @@ void RicAppendSummaryPlotsForObjectsFeature::setupActionLook( QAction* actionToS
if ( !addresses.empty() )
{
auto firstAdr = addresses.front();
if ( firstAdr->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL )
{
objectType = "Wells";
}
else if ( firstAdr->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP )
{
objectType = "Groups";
}
else if ( firstAdr->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION )
{
objectType = "Regions";
}
objectType = caf::AppEnum<RimSummaryAddressCollection::CollectionContentType>::uiText( firstAdr->contentType() );
}
auto text = QString( "Append Plots For " ) + objectType;
@@ -136,9 +125,7 @@ std::vector<RimSummaryAddressCollection*> RicAppendSummaryPlotsForObjectsFeature
if ( sumAddressCollections.size() == 1 )
{
auto coll = sumAddressCollections[0];
if ( coll->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_FOLDER ||
coll->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP_FOLDER ||
coll->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION_FOLDER )
if ( coll->isFolder() )
{
// If a folder is selected, return all sub items in folder
auto childObjects = coll->subFolders();