mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
#3974 Update view when attributes are created
This commit is contained in:
1 parent
fb92b548c5
commit
431ce346ea
1 file changed
+33
-1
@@ -24,6 +24,9 @@
|
|||||||
#include "Rim3dView.h"
|
#include "Rim3dView.h"
|
||||||
#include "RimPerforationInterval.h"
|
#include "RimPerforationInterval.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
#include "RimWellPathAttribute.h"
|
||||||
|
#include "RimWellPathAttributeCollection.h"
|
||||||
|
#include "RimWellPathValve.h"
|
||||||
#include "Rim2dIntersectionView.h"
|
#include "Rim2dIntersectionView.h"
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
@@ -32,7 +35,7 @@
|
|||||||
#include "RivWellPathSourceInfo.h"
|
#include "RivWellPathSourceInfo.h"
|
||||||
|
|
||||||
#include "cafDisplayCoordTransform.h"
|
#include "cafDisplayCoordTransform.h"
|
||||||
|
#include "cafSelectionManager.h"
|
||||||
#include "cvfPart.h"
|
#include "cvfPart.h"
|
||||||
#include "cvfVector3.h"
|
#include "cvfVector3.h"
|
||||||
#include "RivIntersectionPartMgr.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()))
|
if (dynamic_cast<const RivWellPathSourceInfo*>(firstPickedPart->sourceInfo()))
|
||||||
|
|||||||
Reference in new issue
Block a user