mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-15 09:52:11 -05:00
#7818 Modeled Well Path : Add support for creation of N laterals based on a template
This commit is contained in:
1 parent
95463c6521
commit
73f8046353
15 files changed
+970
-16
No files matched your search
@@ -60,6 +60,7 @@
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QCollator>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QString>
|
||||
@@ -729,7 +730,13 @@ void RimWellPathCollection::removeWellPath( gsl::not_null<RimWellPath*> wellPath
|
||||
bool lessWellPath( const caf::PdmPointer<RimWellPath>& w1, const caf::PdmPointer<RimWellPath>& w2 )
|
||||
{
|
||||
if ( w1.notNull() && w2.notNull() )
|
||||
return ( w1->name() < w2->name() );
|
||||
{
|
||||
// Use QCollator to sort integer values in addition to text
|
||||
|
||||
QCollator collator;
|
||||
collator.setNumericMode( true );
|
||||
return collator.compare( w1->name(), w2->name() ) < 0;
|
||||
}
|
||||
else if ( w1.notNull() )
|
||||
return true;
|
||||
else
|
||||
@@ -906,6 +913,11 @@ std::map<QString, std::vector<RimWellPath*>>
|
||||
rootWells[RimWellPathCollection::unGroupedText()].push_back( wellPath );
|
||||
}
|
||||
|
||||
for ( auto [groupName, wellPaths] : rootWells )
|
||||
{
|
||||
std::sort( wellPaths.begin(), wellPaths.end(), lessWellPath );
|
||||
}
|
||||
|
||||
return rootWells;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user