mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7365 StimPlanModel: Sort pressure table items by depth
This commit is contained in:
parent
5d331656cd
commit
1b91e4d344
@ -69,13 +69,14 @@ caf::PdmField<bool>* RimPressureTable::useForInitialPressureField()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<RimPressureTableItem*> RimPressureTable::items() const
|
std::vector<RimPressureTableItem*> RimPressureTable::items() const
|
||||||
{
|
{
|
||||||
std::vector<RimPressureTableItem*> attrs;
|
std::vector<RimPressureTableItem*> pressureTableItems = m_pressureTableItems.childObjects();
|
||||||
|
|
||||||
for ( auto attr : m_pressureTableItems )
|
// Sort by depth
|
||||||
{
|
std::sort( pressureTableItems.begin(), pressureTableItems.end(), []( auto const& a, auto const& b ) {
|
||||||
attrs.push_back( attr.p() );
|
return a->depth() < b->depth();
|
||||||
}
|
} );
|
||||||
return attrs;
|
|
||||||
|
return pressureTableItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user