Cleanup obsolete code

This commit is contained in:
Magne Sjaastad committed 2024-02-16 15:51:19 +01:00
1 parent 5fdf30d124
commit 16896212d4
7 files changed
+21 -47

No files matched your search

@@ -29,9 +29,7 @@ CAF_PDM_SOURCE_INIT( RimPolylineTarget, "PolylineTarget" );
///
//--------------------------------------------------------------------------------------------------
RimPolylineTarget::RimPolylineTarget()
: m_isFullUpdateEnabled( true )
{
CAF_PDM_InitField( &m_isEnabled, "IsEnabled", true, "" );
CAF_PDM_InitFieldNoDefault( &m_targetPointXyd, "TargetPointXyd", "Point" );
}
@@ -42,14 +40,6 @@ RimPolylineTarget::~RimPolylineTarget()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimPolylineTarget::isEnabled() const
{
return m_isEnabled;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -84,14 +74,6 @@ caf::PdmUiFieldHandle* RimPolylineTarget::targetPointUiCapability()
return m_targetPointXyd.uiCapability();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPolylineTarget::enableFullUpdate( bool enable )
{
m_isFullUpdateEnabled = enable;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -38,14 +38,11 @@ public:
RimPolylineTarget();
~RimPolylineTarget() override;
bool isEnabled() const;
void setAsPointTargetXYD( const cvf::Vec3d& point );
void setAsPointXYZ( const cvf::Vec3d& point );
cvf::Vec3d targetPointXYZ() const;
caf::PdmUiFieldHandle* targetPointUiCapability();
void enableFullUpdate( bool enable );
void triggerVisualizationUpdate() const;
@@ -54,7 +51,5 @@ private:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
private:
bool m_isFullUpdateEnabled;
caf::PdmField<bool> m_isEnabled;
caf::PdmField<cvf::Vec3d> m_targetPointXyd;
};
@@ -867,7 +867,7 @@ void RimPolygonFilter::updateCells()
std::vector<cvf::Vec3d> points;
for ( auto& target : m_targets )
{
if ( target->isEnabled() ) points.push_back( target->targetPointXYZ() );
points.push_back( target->targetPointXYZ() );
}
// We need at least three points to make a closed polygon, or just 2 for a polyline
@@ -898,7 +898,7 @@ cvf::ref<RigPolyLinesData> RimPolygonFilter::polyLinesData() const
std::vector<cvf::Vec3d> line;
for ( const RimPolylineTarget* target : m_targets )
{
if ( target->isEnabled() ) line.push_back( target->targetPointXYZ() );
line.push_back( target->targetPointXYZ() );
}
pld->setPolyLine( line );
@@ -39,9 +39,9 @@ std::pair<RimPolylineTarget*, RimPolylineTarget*>
foundTarget = true;
}
if ( wt->isEnabled() && !after && foundTarget ) after = wt;
if ( !after && foundTarget ) after = wt;
if ( wt->isEnabled() && !foundTarget ) before = wt;
if ( !foundTarget ) before = wt;
}
return { before, after };
@@ -600,7 +600,7 @@ cvf::ref<RigTexturedSection> RimSeismicSection::texturedSection()
for ( int i = 0; i < (int)m_targets.size(); i++ )
{
if ( m_targets[i]->isEnabled() ) points.push_back( m_targets[i]->targetPointXYZ() );
points.push_back( m_targets[i]->targetPointXYZ() );
}
updateTextureSectionFromPoints( points, zmin, zmax );
}