mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Move findActiveTargetsAroundInsertionPoint to base class
This commit is contained in:
@@ -152,31 +152,6 @@ void RimUserDefinedPolylinesAnnotation::deleteTarget( RimPolylineTarget* targetT
|
||||
delete targetToDelete;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<RimPolylineTarget*, RimPolylineTarget*>
|
||||
RimUserDefinedPolylinesAnnotation::findActiveTargetsAroundInsertionPoint( const RimPolylineTarget* targetToInsertBefore )
|
||||
{
|
||||
RimPolylineTarget* before = nullptr;
|
||||
RimPolylineTarget* after = nullptr;
|
||||
|
||||
bool foundTarget = false;
|
||||
for ( const auto& wt : m_targets )
|
||||
{
|
||||
if ( wt == targetToInsertBefore )
|
||||
{
|
||||
foundTarget = true;
|
||||
}
|
||||
|
||||
if ( wt->isEnabled() && !after && foundTarget ) after = wt;
|
||||
|
||||
if ( wt->isEnabled() && !foundTarget ) before = wt;
|
||||
}
|
||||
|
||||
return { before, after };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -60,8 +60,6 @@ public:
|
||||
|
||||
void appendTarget( const cvf::Vec3d& defaultPos = cvf::Vec3d::ZERO );
|
||||
|
||||
std::pair<RimPolylineTarget*, RimPolylineTarget*> findActiveTargetsAroundInsertionPoint( const RimPolylineTarget* targetToInsertBefore );
|
||||
|
||||
void enablePicking( bool enable );
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user