mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor delete operations for pdm objects.
This commit is contained in:
committed by
Magne Sjaastad
parent
80ee1256e7
commit
c366e85682
@@ -164,6 +164,8 @@ RimAnalysisPlot::RimAnalysisPlot()
|
||||
CAF_PDM_InitFieldNoDefault( &m_plotDataFilterCollection, "PlotDataFilterCollection", "PlotDataFilterCollection", "", "", "" );
|
||||
m_plotDataFilterCollection.uiCapability()->setUiTreeHidden( true );
|
||||
m_plotDataFilterCollection = new RimPlotDataFilterCollection;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -114,6 +114,8 @@ RimPlotDataFilterItem::RimPlotDataFilterItem()
|
||||
CAF_PDM_InitFieldNoDefault( &m_explicitlySelectedTimeSteps, "ExplicitlySelectedTimeSteps", "TimeSteps", "", "", "" );
|
||||
m_explicitlySelectedTimeSteps.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
|
||||
m_explicitlySelectedTimeSteps.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -285,3 +285,12 @@ void RimAnnotationCollection::loadDataAndUpdate()
|
||||
{
|
||||
reloadPolylinesFromFile( polylinesFromFileAnnotations() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAnnotationCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
onAnnotationDeleted();
|
||||
}
|
||||
|
||||
@@ -68,6 +68,9 @@ public:
|
||||
// Used by sync code
|
||||
std::vector<caf::PdmObject*> allPdmAnnotations() const;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
private:
|
||||
void reloadPolylinesFromFile( const std::vector<RimPolylinesFromFileAnnotation*>& polyLinesObjsToReload );
|
||||
|
||||
|
||||
@@ -445,3 +445,12 @@ void RimAnnotationInViewCollection::deleteGlobalAnnotation( const caf::PdmObject
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAnnotationInViewCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
onAnnotationDeleted();
|
||||
}
|
||||
|
||||
@@ -64,6 +64,9 @@ public:
|
||||
RiaFontCache::FontSize fontSize,
|
||||
bool forceSizeChange = false );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
@@ -49,6 +49,8 @@ RimPolylinesAnnotation::RimPolylinesAnnotation()
|
||||
m_appearance = new RimPolylineAppearance();
|
||||
m_appearance.uiCapability()->setUiTreeHidden( true );
|
||||
m_appearance.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -57,6 +57,8 @@ RimReachCircleAnnotation::RimReachCircleAnnotation()
|
||||
m_appearance.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
m_centerPointEventHandler.reset( new RicVec3dPickEventHandler( &m_centerPointXyd ) );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -77,6 +77,8 @@ RimTextAnnotation::RimTextAnnotation()
|
||||
|
||||
m_anchorPointPickEventHandler.reset( new RicVec3dPickEventHandler( &m_anchorPointXyd ) );
|
||||
m_labelPointPickEventHandler.reset( new RicVec3dPickEventHandler( &m_labelPointXyd, 0.1 ) );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -63,6 +63,8 @@ RimEllipseFractureTemplate::RimEllipseFractureTemplate()
|
||||
createFractureGridAndAssignConductivities();
|
||||
|
||||
// clang-format on
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -45,6 +45,8 @@ RimFishboneWellPath::RimFishboneWellPath()
|
||||
m_displayCoordinates.uiCapability()->setUiReadOnly( true );
|
||||
m_displayCoordinates.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() );
|
||||
m_displayCoordinates.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LabelPosType::TOP );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -155,6 +155,7 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
m_pipeProperties = new RimFishbonesPipeProperties;
|
||||
|
||||
m_rigFishbonesGeometry = std::unique_ptr<RigFisbonesGeometry>( new RigFisbonesGeometry( this ) );
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -436,3 +436,27 @@ int RimFractureTemplateCollection::nextFractureTemplateId()
|
||||
|
||||
return newId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplateCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimProject* proj = nullptr;
|
||||
firstAncestorOrThisOfType( proj );
|
||||
if ( proj )
|
||||
{
|
||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
std::vector<Rim3dView*> views;
|
||||
proj->allVisibleViews( views );
|
||||
for ( Rim3dView* visibleView : views )
|
||||
{
|
||||
if ( dynamic_cast<RimEclipseView*>( visibleView ) )
|
||||
{
|
||||
visibleView->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,9 @@ public:
|
||||
|
||||
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ RimPerforationInterval::RimPerforationInterval()
|
||||
m_startMD.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
m_endMD.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
// clang-format on
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -50,6 +50,8 @@ RimSimWellFracture::RimSimWellFracture( void )
|
||||
m_displayIJK.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitField( &m_branchIndex, "Branch", 0, "Branch", "", "", "" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -32,6 +32,8 @@ RimSimWellFractureCollection::RimSimWellFractureCollection( void )
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &simwellFractures, "Fractures", "", "", "", "" );
|
||||
simwellFractures.uiCapability()->setUiHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -88,6 +88,7 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate()
|
||||
m_readError = false;
|
||||
|
||||
// clang-format on
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -39,6 +39,8 @@ RimWellPathFracture::RimWellPathFracture( void )
|
||||
|
||||
CAF_PDM_InitField( &m_measuredDepth, "MeasuredDepth", 0.0f, "Measured Depth Location", "", "", "" );
|
||||
m_measuredDepth.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -45,6 +45,8 @@ RimWellPathFractureCollection::RimWellPathFractureCollection( void )
|
||||
|
||||
CAF_PDM_InitField( &m_refMDType_OBSOLETE, "RefMDType", std::numeric_limits<int>::max(), "Reference MD", "", "", "" );
|
||||
CAF_PDM_InitField( &m_refMD_OBSOLETE, "RefMD", std::numeric_limits<double>::infinity(), "", "", "", "" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -62,6 +62,8 @@ RimWellPathValve::RimWellPathValve()
|
||||
m_createValveTemplate.uiCapability()->setUiEditorTypeName( caf::PdmUiToolButtonEditor::uiEditorTypeName() );
|
||||
|
||||
nameField()->uiCapability()->setUiReadOnly( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -71,6 +71,8 @@ RimCorrelationPlot::RimCorrelationPlot()
|
||||
m_correlationFactor.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
||||
CAF_PDM_InitField( &m_showAbsoluteValues, "CorrelationAbsValues", false, "Show Absolute Values", "", "", "" );
|
||||
CAF_PDM_InitField( &m_sortByAbsoluteValues, "CorrelationAbsSorting", true, "Sort by Absolute Values", "", "", "" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -107,6 +107,7 @@ RimFlowCharacteristicsPlot::RimFlowCharacteristicsPlot()
|
||||
|
||||
this->m_showWindow = false;
|
||||
setAsPlotMdiWindow();
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -130,6 +130,7 @@ RimWellAllocationPlot::RimWellAllocationPlot()
|
||||
m_accumulatedWellFlowPlot->setCommonDataSourceEnabled( false );
|
||||
|
||||
m_showWindow = false;
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -76,6 +76,8 @@ RimGridCrossPlot::RimGridCrossPlot()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_crossPlotDataSets, "CrossPlotCurve", "Cross Plot Data Set", "", "", "" );
|
||||
m_crossPlotDataSets.uiCapability()->setUiHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1080,6 +1082,16 @@ void RimGridCrossPlot::cleanupBeforeClose()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimGridCrossPlot::isDeletable() const
|
||||
{
|
||||
RimMultiPlot* plotWindow = nullptr;
|
||||
firstAncestorOrThisOfType( plotWindow );
|
||||
return plotWindow == nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Name Configuration
|
||||
///
|
||||
|
||||
@@ -112,6 +112,8 @@ public:
|
||||
caf::PdmObject* findPdmObjectFromQwtCurve( const QwtPlotCurve* curve ) const override;
|
||||
void onAxisSelected( int axis, bool toggle ) override;
|
||||
|
||||
bool isDeletable() const override;
|
||||
|
||||
protected:
|
||||
void deleteViewWidget() override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
|
||||
@@ -133,6 +133,7 @@ RimGridCrossPlotDataSet::RimGridCrossPlotDataSet()
|
||||
m_plotCellFilterCollection = new RimPlotCellFilterCollection;
|
||||
|
||||
setDefaults();
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -89,6 +89,8 @@ RimBoxIntersection::RimBoxIntersection()
|
||||
CAF_PDM_InitFieldNoDefault( &m_show3DManipulator, "show3DManipulator", "", "", "", "" );
|
||||
caf::PdmUiPushButtonEditor::configureEditorForField( &m_show3DManipulator );
|
||||
m_show3DManipulator = false;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -74,6 +74,7 @@ RimCellRangeFilter::RimCellRangeFilter()
|
||||
"" );
|
||||
|
||||
updateIconState();
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -130,6 +130,15 @@ void RimCellRangeFilterCollection::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
updateDisplayModeNotifyManagedViews( nullptr );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellRangeFilterCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
updateDisplayModeNotifyManagedViews( nullptr );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -54,6 +54,9 @@ public:
|
||||
void updateDisplayModeNotifyManagedViews( RimCellRangeFilter* changedRangeFilter );
|
||||
void updateIconState();
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
||||
|
||||
@@ -32,6 +32,8 @@ RimColorLegend::RimColorLegend()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_colorLegendItems, "ColorLegendItems", "", "", "", "" );
|
||||
m_colorLegendItems.uiCapability()->setUiHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -63,6 +65,7 @@ void RimColorLegend::setColorLegendName( const QString& colorLegendName )
|
||||
void RimColorLegend::setReadOnly( bool doReadOnly )
|
||||
{
|
||||
m_colorLegendName.uiCapability()->setUiReadOnly( true );
|
||||
setDeletable( !doReadOnly );
|
||||
|
||||
for ( auto colorLegendItem : m_colorLegendItems )
|
||||
{
|
||||
|
||||
@@ -42,6 +42,8 @@ RimColorLegendItem::RimColorLegendItem()
|
||||
m_nameProxy.registerGetMethod( this, &RimColorLegendItem::extractColorItemName );
|
||||
m_nameProxy.uiCapability()->setUiHidden( true );
|
||||
m_nameProxy.xmlCapability()->disableIO();
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -69,6 +71,7 @@ void RimColorLegendItem::setReadOnly( bool doReadOnly )
|
||||
m_categoryName.uiCapability()->setUiReadOnly( true );
|
||||
m_categoryValue.uiCapability()->setUiReadOnly( true );
|
||||
m_color.uiCapability()->setUiReadOnly( true );
|
||||
setDeletable( !doReadOnly );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "RimDepthTrackPlot.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
|
||||
#include "RigWellLogCurveData.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
@@ -1053,3 +1055,12 @@ void RimDepthTrackPlot::setDepthUnit( RiaDefines::DepthUnitType depthUnit )
|
||||
|
||||
updateLayout();
|
||||
}
|
||||
|
||||
void RimDepthTrackPlot::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
calculateAvailableDepthRange();
|
||||
updateZoom();
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateWellLogPlotToolBar();
|
||||
}
|
||||
|
||||
@@ -120,6 +120,9 @@ public:
|
||||
QString asciiDataForPlotExport() const;
|
||||
void handleKeyPressEvent( QKeyEvent* keyEvent );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
QImage snapshotWindowContent() override;
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ RimEclipseInputProperty::RimEclipseInputProperty()
|
||||
resolvedState.uiCapability()->setUiEditorTypeName( caf::PdmUiLineEditor::uiEditorTypeName() );
|
||||
|
||||
fileName.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -207,6 +207,8 @@ RimEclipseView::RimEclipseView()
|
||||
nameConfig()->hideAggregationTypeField( true );
|
||||
nameConfig()->hidePropertyField( false );
|
||||
nameConfig()->hideSampleSpacingField( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -2250,7 +2252,7 @@ bool RimEclipseView::isUsingFormationNames() const
|
||||
{
|
||||
if ( cellResult()->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES ) return true;
|
||||
|
||||
return true;
|
||||
return true;
|
||||
|
||||
return eclipsePropertyFilterCollection()->isUsingFormationNames();
|
||||
}
|
||||
|
||||
@@ -126,6 +126,8 @@ RimExtrudedCurveIntersection::RimExtrudedCurveIntersection()
|
||||
inputTwoAzimuthPointsFromViewerEnabled = false;
|
||||
|
||||
uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -48,6 +48,8 @@ RimFormationNames::RimFormationNames()
|
||||
CAF_PDM_InitFieldNoDefault( &m_formationNamesFileName, "FormationNamesFileName", "File Name", "", "", "" );
|
||||
|
||||
m_formationNamesFileName.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "RimFormationNamesCollection.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimFormationNames.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
@@ -33,6 +34,8 @@ RimFormationNamesCollection::RimFormationNamesCollection()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_formationNamesList, "FormationNamesList", "Formations", "", "", "" );
|
||||
m_formationNamesList.uiCapability()->setUiHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -129,3 +132,16 @@ void RimFormationNamesCollection::updateFilePathsFromProjectPath( const QString&
|
||||
fmNames->updateFilePathsFromProjectPath( newProjectPath, oldProjectPath );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFormationNamesCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
for ( caf::PdmObjectHandle* reffingObj : referringObjects )
|
||||
{
|
||||
RimCase* aCase = dynamic_cast<RimCase*>( reffingObj );
|
||||
if ( aCase ) aCase->updateFormationNamesData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ public:
|
||||
RimFormationNames* importFiles( const QStringList& fileNames );
|
||||
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimFormationNames*> m_formationNamesList;
|
||||
};
|
||||
|
||||
@@ -107,6 +107,8 @@ RimGeoMechView::RimGeoMechView( void )
|
||||
nameConfig()->hideAggregationTypeField( true );
|
||||
nameConfig()->hidePropertyField( false );
|
||||
nameConfig()->hideSampleSpacingField( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -77,6 +77,8 @@ RimGridTimeHistoryCurve::RimGridTimeHistoryCurve()
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -90,6 +90,8 @@ RimIdenticalGridCaseGroup::RimIdenticalGridCaseGroup()
|
||||
|
||||
m_unionOfMatrixActiveCells = new RigActiveCellInfo;
|
||||
m_unionOfFractureActiveCells = new RigActiveCellInfo;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -339,6 +339,22 @@ void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
syncronize2dIntersectionViews();
|
||||
|
||||
Rim3dView* rimView = nullptr;
|
||||
firstAncestorOrThisOfType( rimView );
|
||||
if ( rimView )
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -77,6 +77,8 @@ public:
|
||||
std::vector<RimExtrudedCurveIntersection*> intersections() const;
|
||||
std::vector<RimBoxIntersection*> intersectionBoxes() const;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects );
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
@@ -75,6 +75,8 @@ RimIntersectionResultDefinition::RimIntersectionResultDefinition()
|
||||
m_ternaryLegendConfig.uiCapability()->setUiHidden( true );
|
||||
m_ternaryLegendConfig.uiCapability()->setUiTreeChildrenHidden( false );
|
||||
m_ternaryLegendConfig = new RimTernaryLegendConfig;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -112,3 +112,18 @@ void RimIntersectionResultsDefinitionCollection::initAfterRead()
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionResultsDefinitionCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOrThisOfType( gridView );
|
||||
if ( gridView )
|
||||
{
|
||||
gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
gridView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ public:
|
||||
std::vector<RimIntersectionResultDefinition*> intersectionResultsDefinitions() const;
|
||||
|
||||
void appendIntersectionResultDefinition( RimIntersectionResultDefinition* interResDef );
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
@@ -77,6 +77,8 @@ RimMultiPlot::RimMultiPlot()
|
||||
CAF_PDM_InitFieldNoDefault( &m_majorTickmarkCount, "MajorTickmarkCount", "Major Tickmark Count", "", "", "" );
|
||||
|
||||
m_viewer = nullptr;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -252,3 +252,12 @@ void RimPlot::onWheelEvent( QWheelEvent* event )
|
||||
{
|
||||
handleWheelEvent( event );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlot::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
@@ -88,6 +88,9 @@ public:
|
||||
virtual void detachAllCurves() = 0;
|
||||
virtual caf::PdmObject* findPdmObjectFromQwtCurve( const QwtPlotCurve* curve ) const = 0;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
@@ -30,6 +30,8 @@ RimPropertyFilter::RimPropertyFilter()
|
||||
CAF_PDM_InitObject( "Property Filter", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_selectedCategoryValues, "SelectedValues", "Values", "", "", "" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -66,6 +66,18 @@ void RimPropertyFilterCollection::updateDisplayModelNotifyManagedViews( RimPrope
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
void RimPropertyFilterCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
Rim3dView* view = nullptr;
|
||||
this->firstAncestorOrThisOfType( view );
|
||||
CVF_ASSERT( view );
|
||||
if ( !view ) return;
|
||||
|
||||
view->scheduleGeometryRegen( PROPERTY_FILTERED );
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
|
||||
void updateDisplayModelNotifyManagedViews( RimPropertyFilter* changedFilter ) const;
|
||||
virtual void updateIconState() = 0;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects );
|
||||
|
||||
protected:
|
||||
// Overridden methods
|
||||
|
||||
@@ -853,3 +853,18 @@ Rim2dIntersectionView* corresponding2dIntersectionView( RimSimWellInView* simWel
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellInView::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimEclipseView* view = nullptr;
|
||||
this->firstAncestorOrThisOfType( view );
|
||||
|
||||
if ( view )
|
||||
{
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +111,9 @@ public:
|
||||
|
||||
cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
@@ -85,8 +85,9 @@ RimViewController::RimViewController()
|
||||
|
||||
CAF_PDM_InitField(&m_syncRangeFilters, "SyncRangeFilters", false, "Range Filters", "", "", "");
|
||||
CAF_PDM_InitField(&m_syncPropertyFilters, "SyncPropertyFilters", false,"Property Filters", "", "", "");
|
||||
|
||||
// clang-format on
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "RimViewLinkerCollection.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
|
||||
@@ -92,3 +93,21 @@ void RimViewLinkerCollection::initAfterRead()
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimViewLinkerCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
uiCapability()->updateConnectedEditors();
|
||||
|
||||
RimProject* project = nullptr;
|
||||
firstAncestorOrThisOfType( project );
|
||||
if ( project )
|
||||
{
|
||||
// Update visibility of top level Linked Views item in the project tree
|
||||
// Not visible if no views are linked
|
||||
project->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ public:
|
||||
caf::PdmField<bool> isActive;
|
||||
caf::PdmChildField<RimViewLinker*> viewLinker;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects );
|
||||
|
||||
protected:
|
||||
caf::PdmFieldHandle* objectToggleField() override { return &isActive; }
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
|
||||
@@ -53,6 +53,8 @@ RimWellLogCurve::RimWellLogCurve()
|
||||
m_curveData = new RigWellLogCurveData;
|
||||
|
||||
m_curveDataXRange = std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -60,6 +60,8 @@ RimWellLogPlot::RimWellLogPlot()
|
||||
":/WellLogPlot16x16.png",
|
||||
"",
|
||||
"A Well Log Plot With a shared Depth Axis and Multiple Tracks" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -19,12 +19,17 @@
|
||||
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
|
||||
#include "RiuPlotMainWindow.h"
|
||||
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigGeoMechWellLogExtractor.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
@@ -206,3 +211,20 @@ void RimWellLogPlotCollection::removeExtractors( const RigGeoMechCaseData* caseD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RimWellLogPlotCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
// Make sure the plot collection disappears with the last plot
|
||||
if ( wellLogPlots.empty() )
|
||||
{
|
||||
RimProject* project = RimProject::current();
|
||||
if ( project )
|
||||
{
|
||||
project->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateWellLogPlotToolBar();
|
||||
}
|
||||
|
||||
@@ -61,6 +61,8 @@ public:
|
||||
void removeExtractors( const RigEclipseCaseData* caseData );
|
||||
void removeExtractors( const RigGeoMechCaseData* caseData );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects );
|
||||
|
||||
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
||||
|
||||
private:
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaExtractionTools.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaSimWellBranchTools.h"
|
||||
|
||||
@@ -73,13 +74,13 @@
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "RiuPlotAnnotationTool.h"
|
||||
#include "RiuPlotMainWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
#include "RiuQwtLinearScaleEngine.h"
|
||||
#include "RiuQwtPlotWidget.h"
|
||||
#include "RiuWellLogTrack.h"
|
||||
#include "RiuWellPathComponentPlotItem.h"
|
||||
|
||||
#include "RiuQwtLinearScaleEngine.h"
|
||||
|
||||
#include "cafPdmUiSliderEditor.h"
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cvfAssert.h"
|
||||
@@ -2797,3 +2798,15 @@ void RimWellLogTrack::doUpdateLayout()
|
||||
{
|
||||
m_plotWidget->scheduleReplot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
setAutoScaleXEnabled( true );
|
||||
updateZoomInQwt();
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateWellLogPlotToolBar();
|
||||
}
|
||||
|
||||
@@ -208,6 +208,8 @@ public:
|
||||
bool forceChange = false ) override;
|
||||
|
||||
void onAxisSelected( int axis, bool toggle ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
void updateAxes() override;
|
||||
|
||||
|
||||
@@ -903,3 +903,12 @@ bool RimWellPath::isAssociatedWithSimulationWell() const
|
||||
{
|
||||
return !m_simWellName().isEmpty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
@@ -138,6 +138,9 @@ public:
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
// Override PdmObject
|
||||
|
||||
|
||||
@@ -665,7 +665,6 @@ RiaEclipseUnitTools::UnitSystemType RimWellPathCollection::findUnitSystemForWell
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
RimWellMeasurementCollection* RimWellPathCollection::measurementCollection()
|
||||
{
|
||||
return m_wellMeasurements;
|
||||
@@ -674,8 +673,17 @@ RimWellMeasurementCollection* RimWellPathCollection::measurementCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
const RimWellMeasurementCollection* RimWellPathCollection::measurementCollection() const
|
||||
{
|
||||
return m_wellMeasurements;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
scheduleRedrawAffectedViews();
|
||||
uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
@@ -115,6 +115,9 @@ public:
|
||||
RimWellMeasurementCollection* measurementCollection();
|
||||
const RimWellMeasurementCollection* measurementCollection() const;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ RimAsciiDataCurve::RimAsciiDataCurve()
|
||||
|
||||
m_symbolSkipPixelDistance = 10.0f;
|
||||
m_curveThickness = 2;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -91,6 +91,8 @@ RimDerivedEnsembleCaseCollection::RimDerivedEnsembleCaseCollection()
|
||||
|
||||
setNameAsReadOnly();
|
||||
setName( "Delta Ensemble" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -63,6 +63,8 @@ RimEnsembleCurveFilter::RimEnsembleCurveFilter()
|
||||
m_deleteButton = false;
|
||||
m_deleteButton.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() );
|
||||
m_deleteButton.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RimEnsembleCurveFilter.h"
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include <cafPdmUiPushButtonEditor.h>
|
||||
#include <cafPdmUiTableViewEditor.h>
|
||||
@@ -241,6 +242,17 @@ caf::PdmFieldHandle* RimEnsembleCurveFilterCollection::objectToggleField()
|
||||
return &m_active;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleCurveFilterCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAncestorOrThisOfType( plot );
|
||||
if ( plot ) plot->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -53,6 +53,9 @@ private:
|
||||
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_active;
|
||||
caf::PdmChildArrayField<RimEnsembleCurveFilter*> m_filters;
|
||||
|
||||
@@ -165,6 +165,8 @@ RimEnsembleCurveSet::RimEnsembleCurveSet()
|
||||
m_yValuesSummaryFilter_OBSOLETE.uiCapability()->setUiHidden( true );
|
||||
m_yValuesSummaryFilter_OBSOLETE.xmlCapability()->setIOWritable( false );
|
||||
m_yValuesSummaryFilter_OBSOLETE = new RimSummaryFilter_OBSOLETE;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -337,3 +337,14 @@ caf::PdmFieldHandle* RimEnsembleCurveSetCollection::objectToggleField()
|
||||
{
|
||||
return &m_showCurves;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleCurveSetCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
this->firstAncestorOrThisOfType( plot );
|
||||
if ( plot ) plot->updateConnectedEditors();
|
||||
}
|
||||
|
||||
@@ -66,6 +66,9 @@ public:
|
||||
std::vector<RimEnsembleCurveSet*> curveSetsForSourceStepping() const;
|
||||
RimSummaryPlotSourceStepping* sourceSteppingObject() const;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
private:
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@ RimSummaryCurve::RimSummaryCurve()
|
||||
m_xValuesSummaryFilter_OBSOLETE.uiCapability()->setUiHidden( true );
|
||||
m_xValuesSummaryFilter_OBSOLETE.xmlCapability()->setIOWritable( false );
|
||||
m_xValuesSummaryFilter_OBSOLETE = new RimSummaryFilter_OBSOLETE;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -2049,6 +2049,16 @@ size_t RimSummaryPlot::curveCount() const
|
||||
return m_summaryCurveCollection->curves().size() + m_gridTimeHistoryCurves.size() + m_asciiDataCurves.size();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryPlot::isDeletable() const
|
||||
{
|
||||
RimMultiPlot* plotWindow = nullptr;
|
||||
firstAncestorOrThisOfType( plotWindow );
|
||||
return plotWindow == nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -181,6 +181,8 @@ public:
|
||||
void deleteViewWidget() override;
|
||||
void initAfterRead() override;
|
||||
|
||||
bool isDeletable() const override;
|
||||
|
||||
private:
|
||||
RiuQwtPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override;
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiuPlotMainWindow.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
@@ -103,3 +106,14 @@ void RimSummaryPlotCollection::removeSummaryPlot( RimSummaryPlot* summaryPlot )
|
||||
{
|
||||
summaryPlots.removeChildObject( summaryPlot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlotCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
updateSummaryNameHasChanged();
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
}
|
||||
|
||||
@@ -46,4 +46,7 @@ public:
|
||||
void summaryPlotItemInfos( QList<caf::PdmOptionItemInfo>* optionInfos ) const;
|
||||
|
||||
void removeSummaryPlot( RimSummaryPlot* summaryPlot );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
};
|
||||
|
||||
@@ -41,6 +41,8 @@ RimSurface::RimSurface()
|
||||
CAF_PDM_InitField( &m_color, "SurfaceColor", cvf::Color3f( 0.5f, 0.3f, 0.2f ), "Color", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_depthOffset, "DepthOffset", 0.0, "Depth Offset", "", "", "" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -233,3 +233,12 @@ void RimSurfaceCollection::updateViews()
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSurfaceCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
updateViews();
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@ public:
|
||||
void updateViews();
|
||||
void updateViews( const std::vector<RimSurface*>& surfsToReload );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimSurface*> m_surfaces;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user