#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

@@ -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() );