Refactor delete operations for pdm objects.

This commit is contained in:
Kristian Bendiksen authored and Magne Sjaastad committed 2020-05-22 07:02:53 +02:00
1 parent 80ee1256e7
commit c366e85682
90 files changed
+474 -438

No files matched your search

@@ -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 );
}
//--------------------------------------------------------------------------------------------------