mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3974 Update view when attributes are created
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
#include "Rim3dView.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathAttribute.h"
|
||||
#include "RimWellPathAttributeCollection.h"
|
||||
#include "RimWellPathValve.h"
|
||||
#include "Rim2dIntersectionView.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
@@ -32,7 +35,7 @@
|
||||
#include "RivWellPathSourceInfo.h"
|
||||
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cvfPart.h"
|
||||
#include "cvfVector3.h"
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
@@ -95,6 +98,35 @@ bool RicWellPathPickEventHandler::handlePickEvent(const Ric3DPickEvent& eventObj
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dynamic_cast<RimWellPathValve*>(sourceInfo->object()))
|
||||
{
|
||||
objectToSelect = sourceInfo->object();
|
||||
RimWellPath* wellPath = nullptr;
|
||||
objectToSelect->firstAncestorOrThisOfType(wellPath);
|
||||
|
||||
RimWellPathValve* valve = static_cast<RimWellPathValve*>(sourceInfo->object());
|
||||
|
||||
QString valveText = QString("Well Path: %1\nValve: %2\nTemplate: %3").arg(wellPath->name()).arg(valve->name()).arg(valve->valveTemplate()->name());
|
||||
|
||||
RiuMainWindow::instance()->setResultInfo(valveText);
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(objectToSelect);
|
||||
}
|
||||
else if (dynamic_cast<RimWellPathAttribute*>(sourceInfo->object()))
|
||||
{
|
||||
RimWellPath* wellPath = nullptr;
|
||||
|
||||
RimWellPathAttribute* attribute = static_cast<RimWellPathAttribute*>(sourceInfo->object());
|
||||
RimWellPathAttributeCollection* collection = nullptr;
|
||||
attribute->firstAncestorOrThisOfTypeAsserted(collection);
|
||||
collection->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
|
||||
QString attrText = QString("Well Path: %1\nCasing Design Attribute: %2")
|
||||
.arg(wellPath->name())
|
||||
.arg(attribute->componentLabel());
|
||||
|
||||
RiuMainWindow::instance()->setResultInfo(attrText);
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(collection);
|
||||
}
|
||||
}
|
||||
|
||||
if (dynamic_cast<const RivWellPathSourceInfo*>(firstPickedPart->sourceInfo()))
|
||||
|
||||
Reference in New Issue
Block a user