mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #8888 from OPM/8887-fix-reorder-capability
Fix reorder capability
This commit is contained in:
@@ -137,7 +137,7 @@ void RimUserDefinedPolylinesAnnotation::appendTarget( const cvf::Vec3d& defaultP
|
||||
void RimUserDefinedPolylinesAnnotation::insertTarget( const RimPolylineTarget* targetToInsertBefore,
|
||||
RimPolylineTarget* targetToInsert )
|
||||
{
|
||||
size_t index = m_targets.index( targetToInsertBefore );
|
||||
size_t index = m_targets.indexOf( targetToInsertBefore );
|
||||
if ( index < m_targets.size() )
|
||||
m_targets.insert( index, targetToInsert );
|
||||
else
|
||||
|
||||
@@ -263,7 +263,7 @@ std::vector<RimPolylineTarget*> RimPolygonFilter::activeTargets() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::insertTarget( const RimPolylineTarget* targetToInsertBefore, RimPolylineTarget* targetToInsert )
|
||||
{
|
||||
size_t index = m_targets.index( targetToInsertBefore );
|
||||
size_t index = m_targets.indexOf( targetToInsertBefore );
|
||||
if ( index < m_targets.size() )
|
||||
m_targets.insert( index, targetToInsert );
|
||||
else
|
||||
|
||||
@@ -160,7 +160,7 @@ QString RimFishbones::generatedName() const
|
||||
dynamic_cast<caf::PdmChildArrayField<RimFishbones*>*>( this->parentField() );
|
||||
CVF_ASSERT( container );
|
||||
|
||||
size_t index = container->index( this ) + 1;
|
||||
size_t index = container->indexOf( this ) + 1;
|
||||
return QString( "Fishbone %1" ).arg( index );
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ size_t RimDepthTrackPlot::plotCount() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RimDepthTrackPlot::plotIndex( const RimWellLogTrack* plot ) const
|
||||
{
|
||||
return m_plots.index( plot );
|
||||
return m_plots.indexOf( plot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -308,7 +308,7 @@ size_t RimMultiPlot::plotCount() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RimMultiPlot::plotIndex( const RimPlot* plot ) const
|
||||
{
|
||||
return m_plots.index( plot );
|
||||
return m_plots.indexOf( plot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -71,7 +71,7 @@ std::vector<RimPressureTableItem*> RimPressureTable::items() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPressureTable::insertItem( RimPressureTableItem* insertBefore, RimPressureTableItem* item )
|
||||
{
|
||||
size_t index = m_pressureTableItems.index( insertBefore );
|
||||
size_t index = m_pressureTableItems.indexOf( insertBefore );
|
||||
item->changed.connect( this, &RimPressureTable::onTableChanged );
|
||||
if ( index < m_pressureTableItems.size() )
|
||||
m_pressureTableItems.insert( index, item );
|
||||
|
||||
@@ -513,7 +513,7 @@ void RimSurfaceCollection::deleteSubCollection( const QString& name )
|
||||
auto coll = getSubCollection( name );
|
||||
if ( coll )
|
||||
{
|
||||
auto index = m_subCollections.index( coll );
|
||||
auto index = m_subCollections.indexOf( coll );
|
||||
m_subCollections.erase( index );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1176,7 +1176,7 @@ void RimWellLogTrack::insertCurve( RimWellLogCurve* curve, size_t index )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::removeCurve( RimWellLogCurve* curve )
|
||||
{
|
||||
size_t index = m_curves.index( curve );
|
||||
size_t index = m_curves.indexOf( curve );
|
||||
if ( index < m_curves.size() )
|
||||
{
|
||||
m_curves[index]->detach();
|
||||
@@ -2014,7 +2014,7 @@ caf::PdmFieldHandle* RimWellLogTrack::userDescriptionField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RimWellLogTrack::curveIndex( RimWellLogCurve* curve )
|
||||
{
|
||||
return m_curves.index( curve );
|
||||
return m_curves.indexOf( curve );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -129,7 +129,7 @@ bool RimWellMeasurementCollection::isEmpty() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementCollection::insertMeasurement( RimWellMeasurement* insertBefore, RimWellMeasurement* measurement )
|
||||
{
|
||||
size_t index = m_measurements.index( insertBefore );
|
||||
size_t index = m_measurements.indexOf( insertBefore );
|
||||
if ( index < m_measurements.size() )
|
||||
m_measurements.insert( index, measurement );
|
||||
else
|
||||
|
||||
@@ -82,7 +82,7 @@ std::vector<RimWellPathAttribute*> RimWellPathAttributeCollection::attributes()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttributeCollection::insertAttribute( RimWellPathAttribute* insertBefore, RimWellPathAttribute* attribute )
|
||||
{
|
||||
size_t index = m_attributes.index( insertBefore );
|
||||
size_t index = m_attributes.indexOf( insertBefore );
|
||||
if ( index < m_attributes.size() )
|
||||
m_attributes.insert( index, attribute );
|
||||
else
|
||||
|
||||
@@ -375,7 +375,7 @@ std::pair<RimWellPathTarget*, RimWellPathTarget*>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathGeometryDef::insertTarget( const RimWellPathTarget* targetToInsertBefore, RimWellPathTarget* targetToInsert )
|
||||
{
|
||||
size_t index = m_wellTargets.index( targetToInsertBefore );
|
||||
size_t index = m_wellTargets.indexOf( targetToInsertBefore );
|
||||
if ( index < m_wellTargets.size() )
|
||||
m_wellTargets.insert( index, targetToInsert );
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user