mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
Refactor delete operations for pdm objects.
This commit is contained in:
parent
80ee1256e7
commit
c366e85682
@ -20,41 +20,6 @@
|
||||
#include "RicDeleteItemExec.h"
|
||||
#include "RicDeleteItemExecData.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
|
||||
#include "Rim2dIntersectionViewCollection.h"
|
||||
#include "Rim3dView.h"
|
||||
#include "RimAnalysisPlot.h"
|
||||
#include "RimAnnotationCollection.h"
|
||||
#include "RimAnnotationInViewCollection.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCorrelationPlot.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEnsembleCurveFilterCollection.h"
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimEnsembleCurveSetCollection.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimFractureTemplateCollection.h"
|
||||
#include "RimGeoMechPropertyFilterCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimSummaryCrossPlotCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimSurfaceCollection.h"
|
||||
#include "RimViewLinkerCollection.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuPlotMainWindow.h"
|
||||
|
||||
#include "cafNotificationCenter.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmDocument.h"
|
||||
@ -101,263 +66,7 @@ void RicDeleteItemExec::redo()
|
||||
|
||||
caf::PdmObjectHandle* parentObj = listField->ownerObject();
|
||||
parentObj->uiCapability()->updateConnectedEditors();
|
||||
|
||||
Rim3dView* view = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( view );
|
||||
RimGridView* gridView = dynamic_cast<RimGridView*>( view );
|
||||
|
||||
// Range Filters
|
||||
|
||||
RimCellRangeFilterCollection* rangeFilterColl;
|
||||
parentObj->firstAncestorOrThisOfType( rangeFilterColl );
|
||||
|
||||
if ( rangeFilterColl )
|
||||
{
|
||||
rangeFilterColl->updateDisplayModeNotifyManagedViews( nullptr );
|
||||
}
|
||||
|
||||
// Prop Filter
|
||||
|
||||
RimEclipsePropertyFilterCollection* eclipsePropColl;
|
||||
parentObj->firstAncestorOrThisOfType( eclipsePropColl );
|
||||
|
||||
RimGeoMechPropertyFilterCollection* geoMechPropColl;
|
||||
parentObj->firstAncestorOrThisOfType( geoMechPropColl );
|
||||
|
||||
if ( view && ( eclipsePropColl || geoMechPropColl ) )
|
||||
{
|
||||
view->scheduleGeometryRegen( PROPERTY_FILTERED );
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
// Intersections
|
||||
|
||||
RimIntersectionCollection* intersectionColl;
|
||||
parentObj->firstAncestorOrThisOfType( intersectionColl );
|
||||
if ( view && intersectionColl )
|
||||
{
|
||||
intersectionColl->syncronize2dIntersectionViews();
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
else
|
||||
{
|
||||
RimCase* parentCase = dynamic_cast<RimCase*>( parentObj );
|
||||
if ( parentCase ) // A view was deleted. Need to update the list of intersection views
|
||||
{
|
||||
parentCase->intersectionViewCollection()->syncFromExistingIntersections( true );
|
||||
}
|
||||
}
|
||||
|
||||
// Intersection Result Definitions
|
||||
|
||||
RimIntersectionResultsDefinitionCollection* separateIntersectResDefColl;
|
||||
parentObj->firstAncestorOrThisOfType( separateIntersectResDefColl );
|
||||
if ( gridView && separateIntersectResDefColl )
|
||||
{
|
||||
gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
gridView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
||||
}
|
||||
|
||||
// SimWell Fractures
|
||||
RimSimWellInView* simWell;
|
||||
parentObj->firstAncestorOrThisOfType( simWell );
|
||||
if ( view && simWell )
|
||||
{
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
RimFractureTemplateCollection* fracTemplateColl;
|
||||
parentObj->firstAncestorOrThisOfType( fracTemplateColl );
|
||||
if ( fracTemplateColl )
|
||||
{
|
||||
RimProject* proj = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( proj );
|
||||
if ( proj )
|
||||
{
|
||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
std::vector<Rim3dView*> views;
|
||||
proj->allVisibleViews( views );
|
||||
for ( Rim3dView* visibleView : views )
|
||||
{
|
||||
if ( dynamic_cast<RimEclipseView*>( visibleView ) )
|
||||
{
|
||||
visibleView->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Well paths
|
||||
|
||||
RimWellPath* wellPath;
|
||||
parentObj->firstAncestorOrThisOfType( wellPath );
|
||||
|
||||
if ( wellPath )
|
||||
{
|
||||
wellPath->updateConnectedEditors();
|
||||
}
|
||||
|
||||
RimWellPathCollection* wellPathColl;
|
||||
parentObj->firstAncestorOrThisOfType( wellPathColl );
|
||||
|
||||
if ( wellPathColl )
|
||||
{
|
||||
wellPathColl->scheduleRedrawAffectedViews();
|
||||
wellPathColl->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
// Update due to deletion of curves (not tracks, handled separatly)
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
parentObj->firstAncestorOrThisOfType( wellLogPlot );
|
||||
if ( wellLogPlot )
|
||||
{
|
||||
wellLogPlot->calculateAvailableDepthRange();
|
||||
wellLogPlot->updateZoom();
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateWellLogPlotToolBar();
|
||||
}
|
||||
|
||||
RimWellLogTrack* wellLogPlotTrack;
|
||||
parentObj->firstAncestorOrThisOfType( wellLogPlotTrack );
|
||||
if ( wellLogPlotTrack )
|
||||
{
|
||||
wellLogPlotTrack->setAutoScaleXEnabled( true );
|
||||
wellLogPlotTrack->updateZoomInQwt();
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateWellLogPlotToolBar();
|
||||
}
|
||||
|
||||
// Update due to delete plots
|
||||
// Make sure the plot collection disappears with the last plot
|
||||
|
||||
RimWellLogPlotCollection* wellLogPlotCollection = dynamic_cast<RimWellLogPlotCollection*>( parentObj );
|
||||
if ( wellLogPlotCollection )
|
||||
{
|
||||
if ( wellLogPlotCollection->wellLogPlots.empty() )
|
||||
{
|
||||
RimProject* project = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( project );
|
||||
if ( project )
|
||||
{
|
||||
project->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateWellLogPlotToolBar();
|
||||
}
|
||||
|
||||
// Linked views
|
||||
|
||||
RimViewLinkerCollection* viewLinkerCollection = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( viewLinkerCollection );
|
||||
if ( viewLinkerCollection )
|
||||
{
|
||||
viewLinkerCollection->uiCapability()->updateConnectedEditors();
|
||||
|
||||
RimProject* project = nullptr;
|
||||
parentObj->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();
|
||||
}
|
||||
}
|
||||
|
||||
// Formation names
|
||||
|
||||
RimFormationNamesCollection* formationNamesCollection;
|
||||
parentObj->firstAncestorOrThisOfType( formationNamesCollection );
|
||||
if ( formationNamesCollection )
|
||||
{
|
||||
for ( caf::PdmObjectHandle* reffingObj : referringObjects )
|
||||
{
|
||||
RimCase* aCase = dynamic_cast<RimCase*>( reffingObj );
|
||||
if ( aCase ) aCase->updateFormationNamesData();
|
||||
}
|
||||
}
|
||||
|
||||
RimSummaryPlotCollection* summaryPlotCollection = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( summaryPlotCollection );
|
||||
if ( summaryPlotCollection )
|
||||
{
|
||||
summaryPlotCollection->updateSummaryNameHasChanged();
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
}
|
||||
|
||||
RimSummaryCrossPlotCollection* summaryCrossPlotCollection = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( summaryCrossPlotCollection );
|
||||
if ( summaryCrossPlotCollection )
|
||||
{
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
}
|
||||
|
||||
RimEnsembleCurveSetCollection* ensembleCurveSetColl = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( ensembleCurveSetColl );
|
||||
if ( ensembleCurveSetColl )
|
||||
{
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
ensembleCurveSetColl->firstAncestorOrThisOfType( plot );
|
||||
if ( plot ) plot->updateConnectedEditors();
|
||||
}
|
||||
|
||||
RimEnsembleCurveFilterCollection* ensembleCurveFilterColl = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( ensembleCurveFilterColl );
|
||||
if ( ensembleCurveFilterColl )
|
||||
{
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
ensembleCurveFilterColl->firstAncestorOrThisOfType( plot );
|
||||
if ( plot ) plot->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
{
|
||||
RimAnnotationCollection* annotationColl = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( annotationColl );
|
||||
if ( annotationColl )
|
||||
{
|
||||
annotationColl->onAnnotationDeleted();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
RimAnnotationInViewCollection* annotationColl = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType( annotationColl );
|
||||
if ( annotationColl )
|
||||
{
|
||||
annotationColl->onAnnotationDeleted();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
RimSurfaceCollection* surfCollection;
|
||||
parentObj->firstAncestorOrThisOfType( surfCollection );
|
||||
if ( surfCollection )
|
||||
{
|
||||
surfCollection->updateViews();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
RimAnalysisPlot* analysisPlot;
|
||||
parentObj->firstAncestorOrThisOfType( analysisPlot );
|
||||
if ( analysisPlot )
|
||||
{
|
||||
analysisPlot->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
RimCorrelationPlot* corrPlot;
|
||||
parentObj->firstAncestorOrThisOfType( corrPlot );
|
||||
if ( corrPlot )
|
||||
{
|
||||
corrPlot->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
parentObj->onChildDeleted( listField, referringObjects );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,55 +21,6 @@
|
||||
#include "RicDeleteItemExec.h"
|
||||
#include "RicDeleteItemExecData.h"
|
||||
|
||||
#include "RimAnalysisPlot.h"
|
||||
#include "RimAsciiDataCurve.h"
|
||||
#include "RimBoxIntersection.h"
|
||||
#include "RimCellRangeFilter.h"
|
||||
#include "RimCorrelationPlot.h"
|
||||
#include "RimDerivedEnsembleCaseCollection.h"
|
||||
#include "RimEclipseInputProperty.h"
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEllipseFractureTemplate.h"
|
||||
#include "RimEnsembleCurveFilter.h"
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimExtrudedCurveIntersection.h"
|
||||
#include "RimFishboneWellPath.h"
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimFlowCharacteristicsPlot.h"
|
||||
#include "RimFormationNames.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimGeoMechPropertyFilter.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimGridCrossPlot.h"
|
||||
#include "RimGridCrossPlotDataSet.h"
|
||||
#include "RimGridTimeHistoryCurve.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimIntersectionResultDefinition.h"
|
||||
#include "RimMultiPlot.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimPolylinesAnnotation.h"
|
||||
#include "RimReachCircleAnnotation.h"
|
||||
#include "RimSimWellFracture.h"
|
||||
#include "RimSimWellFractureCollection.h"
|
||||
#include "RimStimPlanFractureTemplate.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSurface.h"
|
||||
#include "RimTextAnnotation.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
#include "RimWellFlowRateCurve.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogRftCurve.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
#include "RimWellPathValve.h"
|
||||
#include "RimWellRftPlot.h"
|
||||
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
#include "cafCmdSelectionHelper.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
@ -77,96 +28,10 @@
|
||||
#include "cafPdmReferenceHelper.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "RimColorLegend.h"
|
||||
#include "RimColorLegendItem.h"
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicDeleteItemFeature, "RicDeleteItemFeature" );
|
||||
|
||||
bool isDeletable( caf::PdmUiItem* uiItem )
|
||||
{
|
||||
// Enable delete of well allocation plots
|
||||
if ( dynamic_cast<RimWellAllocationPlot*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimFlowCharacteristicsPlot*>( uiItem ) ) return true;
|
||||
|
||||
// Disable delete of all sub objects of a well allocation plot
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>( uiItem );
|
||||
if ( destinationObject )
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = nullptr;
|
||||
RimWellRftPlot* rftPlot = nullptr;
|
||||
destinationObject->firstAncestorOrThisOfType( wellAllocationPlot );
|
||||
destinationObject->firstAncestorOrThisOfType( rftPlot );
|
||||
|
||||
if ( wellAllocationPlot || rftPlot )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( dynamic_cast<RimGeoMechView*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimEclipseView*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimIdenticalGridCaseGroup*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimEclipseInputProperty*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimCellRangeFilter*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimEclipsePropertyFilter*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimGeoMechPropertyFilter*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimViewController*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimWellLogPlot*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimWellLogCurve*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimSummaryPlot*>( uiItem ) )
|
||||
{
|
||||
RimMultiPlot* plotWindow = nullptr;
|
||||
static_cast<RimSummaryPlot*>( uiItem )->firstAncestorOrThisOfType( plotWindow );
|
||||
return plotWindow == nullptr;
|
||||
}
|
||||
if ( dynamic_cast<RimSummaryCurve*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimGridTimeHistoryCurve*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimExtrudedCurveIntersection*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimBoxIntersection*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimFormationNames*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimFormationNamesCollection*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimFishboneWellPath*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimFishbonesMultipleSubs*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimPerforationInterval*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimAsciiDataCurve*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimWellPathFractureCollection*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimWellPathFracture*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimEllipseFractureTemplate*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimStimPlanFractureTemplate*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimSimWellFractureCollection*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimSimWellFracture*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimEnsembleCurveSet*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimEnsembleCurveFilter*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimDerivedEnsembleCaseCollection*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimWellPathValve*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimTextAnnotation*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimReachCircleAnnotation*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimPolylinesAnnotation*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimIntersectionResultDefinition*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimSurface*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimColorLegend*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimColorLegendItem*>( uiItem ) ) return true;
|
||||
|
||||
if ( dynamic_cast<RimGridCrossPlot*>( uiItem ) )
|
||||
{
|
||||
RimMultiPlot* plotWindow = nullptr;
|
||||
static_cast<RimGridCrossPlot*>( uiItem )->firstAncestorOrThisOfType( plotWindow );
|
||||
return plotWindow == nullptr;
|
||||
}
|
||||
|
||||
if ( dynamic_cast<RimGridCrossPlot*>( uiItem ) ) return true;
|
||||
|
||||
if ( dynamic_cast<RimGridCrossPlotDataSet*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimAnalysisPlot*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimCorrelationPlot*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimPlotDataFilterItem*>( uiItem ) ) return true;
|
||||
|
||||
if ( dynamic_cast<RimMultiPlot*>( uiItem ) ) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -179,11 +44,11 @@ bool RicDeleteItemFeature::isCommandEnabled()
|
||||
|
||||
for ( caf::PdmUiItem* item : items )
|
||||
{
|
||||
if ( !isDeletable( item ) ) return false;
|
||||
|
||||
caf::PdmObject* currentPdmObject = dynamic_cast<caf::PdmObject*>( item );
|
||||
if ( !currentPdmObject ) return false;
|
||||
|
||||
if ( !currentPdmObject->isDeletable() ) return false;
|
||||
|
||||
caf::PdmChildArrayFieldHandle* childArrayFieldHandle =
|
||||
dynamic_cast<caf::PdmChildArrayFieldHandle*>( currentPdmObject->parentField() );
|
||||
if ( !childArrayFieldHandle ) return false;
|
||||
@ -203,11 +68,11 @@ void RicDeleteItemFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
for ( caf::PdmUiItem* item : items )
|
||||
{
|
||||
if ( !isDeletable( item ) ) continue;
|
||||
|
||||
caf::PdmObject* currentPdmObject = dynamic_cast<caf::PdmObject*>( item );
|
||||
if ( !currentPdmObject ) continue;
|
||||
|
||||
if ( !currentPdmObject->isDeletable() ) continue;
|
||||
|
||||
caf::PdmChildArrayFieldHandle* childArrayFieldHandle =
|
||||
dynamic_cast<caf::PdmChildArrayFieldHandle*>( currentPdmObject->parentField() );
|
||||
if ( !childArrayFieldHandle ) continue;
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -4,11 +4,21 @@
|
||||
#include "cafAssert.h"
|
||||
#include "cafPdmFieldHandle.h"
|
||||
#include "cafPdmObjectCapability.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
||||
|
||||
namespace caf
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
PdmObjectHandle::PdmObjectHandle()
|
||||
{
|
||||
m_parentField = nullptr;
|
||||
m_isDeletable = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -174,6 +184,30 @@ PdmFieldHandle* PdmObjectHandle::parentField() const
|
||||
return m_parentField;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmObjectHandle::setDeletable(bool isDeletable)
|
||||
{
|
||||
m_isDeletable = isDeletable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool PdmObjectHandle::isDeletable() const
|
||||
{
|
||||
return m_isDeletable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmObjectHandle::onChildDeleted(PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects)
|
||||
{
|
||||
}
|
||||
|
||||
// These two functions can be used when PdmCore is used standalone without PdmUi/PdmXml
|
||||
/*
|
||||
PdmUiObjectHandle* PdmObjectHandle::uiCapability()
|
||||
|
@ -16,6 +16,7 @@ class PdmObjectCapability;
|
||||
class PdmFieldHandle;
|
||||
class PdmUiObjectHandle;
|
||||
class PdmXmlObjectHandle;
|
||||
class PdmChildArrayFieldHandle;
|
||||
|
||||
//==================================================================================================
|
||||
/// The base class of all objects
|
||||
@ -23,7 +24,7 @@ class PdmXmlObjectHandle;
|
||||
class PdmObjectHandle
|
||||
{
|
||||
public:
|
||||
PdmObjectHandle() { m_parentField = nullptr; }
|
||||
PdmObjectHandle();
|
||||
virtual ~PdmObjectHandle();
|
||||
|
||||
static QString classKeywordStatic(); // For PdmXmlFieldCap to be able to handle fields of PdmObjectHandle directly
|
||||
@ -85,6 +86,11 @@ public:
|
||||
PdmUiObjectHandle* uiCapability() const; // Implementation is in cafPdmUiObjectHandle.cpp
|
||||
PdmXmlObjectHandle* xmlCapability() const; // Implementation is in cafPdmXmlObjectHandle.cpp
|
||||
|
||||
virtual void setDeletable(bool isDeletable);
|
||||
virtual bool isDeletable() const;
|
||||
virtual void onChildDeleted(PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects);
|
||||
|
||||
protected:
|
||||
void addField(PdmFieldHandle* field, const QString& keyword);
|
||||
|
||||
@ -119,6 +125,8 @@ private:
|
||||
// Support system for PdmPointer
|
||||
friend class PdmPointerImpl;
|
||||
std::set<PdmObjectHandle**> m_pointersReferencingMe;
|
||||
|
||||
bool m_isDeletable;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user