#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

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