mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Release 2023.06
This commit is contained in:
@@ -181,12 +181,10 @@ void RimWellMeasurement::setFilePath( const QString& filePath )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurement::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted( proj );
|
||||
RimProject* proj = RimProject::current();
|
||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
|
||||
RimWellMeasurementCollection* wellMeasurementCollection;
|
||||
this->firstAncestorOrThisOfTypeAsserted( wellMeasurementCollection );
|
||||
auto wellMeasurementCollection = firstAncestorOrThisOfTypeAsserted<RimWellMeasurementCollection>();
|
||||
wellMeasurementCollection->updateAllCurves();
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,7 @@ void RimWellMeasurementCollection::updateAllCurves()
|
||||
{
|
||||
RimMainPlotCollection* plotCollection = RimMainPlotCollection::current();
|
||||
|
||||
std::vector<RimWellMeasurementCurve*> measurementCurves;
|
||||
plotCollection->descendantsIncludingThisOfType( measurementCurves );
|
||||
std::vector<RimWellMeasurementCurve*> measurementCurves = plotCollection->descendantsIncludingThisOfType<RimWellMeasurementCurve>();
|
||||
|
||||
for ( auto curve : measurementCurves )
|
||||
{
|
||||
@@ -80,15 +79,13 @@ void RimWellMeasurementCollection::deleteAllEmptyCurves()
|
||||
{
|
||||
RimMainPlotCollection* plotCollection = RimMainPlotCollection::current();
|
||||
|
||||
std::vector<RimWellMeasurementCurve*> measurementCurves;
|
||||
plotCollection->descendantsIncludingThisOfType( measurementCurves );
|
||||
std::vector<RimWellMeasurementCurve*> measurementCurves = plotCollection->descendantsIncludingThisOfType<RimWellMeasurementCurve>();
|
||||
|
||||
for ( auto curve : measurementCurves )
|
||||
{
|
||||
if ( curve->curveData()->propertyValues().empty() )
|
||||
{
|
||||
RimWellLogTrack* track = nullptr;
|
||||
curve->firstAncestorOrThisOfTypeAsserted( track );
|
||||
auto track = curve->firstAncestorOrThisOfTypeAsserted<RimWellLogTrack>();
|
||||
|
||||
track->removeCurve( curve );
|
||||
delete curve;
|
||||
|
||||
@@ -73,9 +73,7 @@ RimWellMeasurementCurve::~RimWellMeasurementCurve()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
RimDepthTrackPlot* wellLogPlot;
|
||||
firstAncestorOrThisOfType( wellLogPlot );
|
||||
CVF_ASSERT( wellLogPlot );
|
||||
auto wellLogPlot = firstAncestorOrThisOfTypeAsserted<RimDepthTrackPlot>();
|
||||
|
||||
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
|
||||
if ( m_wellPath && !m_measurementKind().isEmpty() && wellPathCollection )
|
||||
@@ -257,14 +255,9 @@ QList<caf::PdmOptionItemInfo> RimWellMeasurementCurve::calculateValueOptions( co
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_measurementKind )
|
||||
{
|
||||
RimWellPathCollection* wellPathCollection = nullptr;
|
||||
if ( m_wellPath )
|
||||
{
|
||||
m_wellPath->firstAncestorOrThisOfTypeAsserted( wellPathCollection );
|
||||
}
|
||||
|
||||
std::set<QString> kindNames;
|
||||
|
||||
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
|
||||
if ( wellPathCollection )
|
||||
{
|
||||
const RimWellMeasurementCollection* measurementCollection = wellPathCollection->measurementCollection();
|
||||
|
||||
@@ -80,7 +80,6 @@ RimWellMeasurementInView::RimWellMeasurementInView()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_qualityFilter, "QualityFilter", "Quality Filter" );
|
||||
m_qualityFilter.uiCapability()->setAutoAddingOptionFromValue( false );
|
||||
m_qualityFilter.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitField( &m_radiusScaleFactor, "RadiusScaleFactor", 2.5, "Radius Scale" );
|
||||
m_radiusScaleFactor.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleValueEditor::uiEditorTypeName() );
|
||||
@@ -171,8 +170,7 @@ void RimWellMeasurementInView::fieldChangedByUi( const caf::PdmFieldHandle* chan
|
||||
}
|
||||
|
||||
updateLegendData();
|
||||
RimGridView* rimGridView = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( rimGridView );
|
||||
auto rimGridView = firstAncestorOrThisOfTypeAsserted<RimGridView>();
|
||||
rimGridView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
|
||||
@@ -122,8 +122,7 @@ void RimWellMeasurementInViewCollection::fieldChangedByUi( const caf::PdmFieldHa
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
RimGridView* rimGridView = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( rimGridView );
|
||||
auto rimGridView = firstAncestorOrThisOfTypeAsserted<RimGridView>();
|
||||
rimGridView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user