mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5116 Well Measurement: select RimWellMeasurementInView when picking in 3d view.
This commit is contained in:
@@ -142,3 +142,21 @@ void RimWellMeasurementInViewCollection::syncWithChangesInWellMeasurementCollect
|
||||
updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Get the "in-view" measurement corresponding to a give measurement.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellMeasurementInView*
|
||||
RimWellMeasurementInViewCollection::getWellMeasurementInView( const RimWellMeasurement* measurement ) const
|
||||
{
|
||||
for ( RimWellMeasurementInView* wellMeasurementInView : measurements() )
|
||||
{
|
||||
if ( wellMeasurementInView->measurementKind() == measurement->kind() )
|
||||
{
|
||||
return wellMeasurementInView;
|
||||
}
|
||||
}
|
||||
|
||||
// No match
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <vector>
|
||||
|
||||
class RimWellMeasurementInView;
|
||||
class RimWellMeasurement;
|
||||
|
||||
class RimWellMeasurementInViewCollection : public RimCheckableNamedObject
|
||||
{
|
||||
@@ -37,6 +38,8 @@ public:
|
||||
|
||||
void syncWithChangesInWellMeasurementCollection();
|
||||
|
||||
RimWellMeasurementInView* getWellMeasurementInView( const RimWellMeasurement* measurement ) const;
|
||||
|
||||
protected:
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
|
||||
Reference in New Issue
Block a user