#8782 Summary Plot: drag'n'drop data vector issue

Duplicate only matching vectors
More rename for Group
This commit is contained in:
Magne Sjaastad 2022-04-08 10:46:54 +02:00
parent 93614ef272
commit 8cdef0d861
6 changed files with 15 additions and 12 deletions

View File

@ -132,7 +132,7 @@ void RicAppendSummaryPlotsForObjectsFeature::setupActionLook( QAction* actionToS
{
objectType = "Wells";
}
else if ( firstAdr->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
else if ( firstAdr->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP )
{
objectType = "Groups";
}
@ -218,7 +218,7 @@ bool RicAppendSummaryPlotsForObjectsFeature::isSelectionCompatibleWithPlot(
errorText = "Source plot must contain one well only to be able to duplicate a selection of wells";
}
}
else if ( selectionType == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
else if ( selectionType == RimSummaryAddressCollection::CollectionContentType::GROUP )
{
if ( analyzer.groupNames().size() != 1 )
{
@ -268,7 +268,7 @@ RifEclipseSummaryAddress
{
adr.setWellName( objectName );
}
else if ( summaryAddressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
else if ( summaryAddressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP )
{
adr.setGroupName( objectName );
}

View File

@ -72,7 +72,7 @@ void RicCreateMultiPlotFromSelectionFeature::onActionTriggered( bool isChecked )
{
wellNames.push_back( a->name() );
}
else if ( a->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
else if ( a->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP )
{
groupNames.push_back( a->name() );
}

View File

@ -558,7 +558,7 @@ QString RicSummaryPlotTemplateTools::placeholderTextForWell()
//--------------------------------------------------------------------------------------------------
QString RicSummaryPlotTemplateTools::placeholderTextForGroup()
{
return "__WELL_GROUP__";
return "__GROUP__";
}
//--------------------------------------------------------------------------------------------------

View File

@ -29,7 +29,7 @@ void caf::AppEnum<RimSummaryAddressCollection::CollectionContentType>::setUp()
{
addItem( RimSummaryAddressCollection::CollectionContentType::NOT_DEFINED, "NOT_DEFINED", "Not Defined" );
addItem( RimSummaryAddressCollection::CollectionContentType::WELL, "WELL", "Well" );
addItem( RimSummaryAddressCollection::CollectionContentType::WELL_GROUP, "WELL_GROUP", "Well Group" );
addItem( RimSummaryAddressCollection::CollectionContentType::GROUP, "GROUP", "Group" );
addItem( RimSummaryAddressCollection::CollectionContentType::REGION, "REGION", "Region" );
addItem( RimSummaryAddressCollection::CollectionContentType::MISC, "MISC", "Miscellaneous" );
addItem( RimSummaryAddressCollection::CollectionContentType::FIELD, "FIELD", "Field" );
@ -155,7 +155,7 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclip
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_GROUP:
groups->addToSubfolder( QString::fromStdString( address.groupName() ),
CollectionContentType::WELL_GROUP,
CollectionContentType::GROUP,
address,
caseId,
ensembleId );
@ -220,7 +220,7 @@ bool RimSummaryAddressCollection::canBeDragged() const
{
bool ok = m_subfolders.size() == 0;
ok = ok && ( m_contentType == CollectionContentType::WELL || m_contentType == CollectionContentType::WELL_GROUP ||
ok = ok && ( m_contentType == CollectionContentType::WELL || m_contentType == CollectionContentType::GROUP ||
m_contentType == CollectionContentType::REGION );
return ok;

View File

@ -37,7 +37,7 @@ public:
{
NOT_DEFINED,
WELL,
WELL_GROUP,
GROUP,
REGION,
FIELD,
MISC,

View File

@ -1972,21 +1972,24 @@ int RimSummaryPlot::handleAddressCollectionDrop( RimSummaryAddressCollection* ad
{
auto newCurveDef = curveDef;
auto curveAdr = newCurveDef.summaryAddress();
if ( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL )
if ( ( curveAdr.category() == RifEclipseSummaryAddress::SUMMARY_WELL ) &&
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL ) )
{
auto currentObjectString = curveAdr.wellName();
curveAdr.setWellName( droppedName );
newCurveDef.setSummaryAddress( curveAdr );
newCurveDefsWithObjectNames[newCurveDef].insert( currentObjectString );
}
else if ( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
else if ( ( curveAdr.category() == RifEclipseSummaryAddress::SUMMARY_GROUP ) &&
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP ) )
{
auto currentObjectString = curveAdr.groupName();
curveAdr.setGroupName( droppedName );
newCurveDef.setSummaryAddress( curveAdr );
newCurveDefsWithObjectNames[newCurveDef].insert( currentObjectString );
}
else if ( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION )
else if ( ( curveAdr.category() == RifEclipseSummaryAddress::SUMMARY_REGION ) &&
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION ) )
{
auto currentObjectString = std::to_string( curveAdr.regionNumber() );