mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 23:23:01 -06:00
(#655) Sort the wells in the Wells folder by name
This commit is contained in:
parent
707e8c68ab
commit
d637248ae9
@ -164,6 +164,8 @@ void RimWellPathCollection::readWellPathFiles()
|
||||
progress.setProgressDescription(QString("Reading file %1").arg(wellPaths[wpIdx]->name));
|
||||
progress.incrementProgress();
|
||||
}
|
||||
|
||||
this->sortWellsByName();
|
||||
}
|
||||
|
||||
|
||||
@ -258,6 +260,8 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimWellPath*>& wellP
|
||||
|
||||
progress.incrementProgress();
|
||||
}
|
||||
|
||||
this->sortWellsByName();
|
||||
}
|
||||
|
||||
|
||||
@ -282,6 +286,8 @@ void RimWellPathCollection::addWellLogs(const QStringList& filePaths)
|
||||
wellPath->setLogFileInfo(logFileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
this->sortWellsByName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -381,6 +387,19 @@ void RimWellPathCollection::removeWellPath(RimWellPath* wellPath)
|
||||
}
|
||||
}
|
||||
|
||||
bool lessWellPath(const caf::PdmPointer<RimWellPath>& w1, const caf::PdmPointer<RimWellPath>& w2)
|
||||
{
|
||||
return (w1->name() < w2->name());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::sortWellsByName()
|
||||
{
|
||||
std::sort(wellPaths.begin(), wellPaths.end(), lessWellPath);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -89,16 +89,18 @@ public:
|
||||
RimWellPath* wellPathByName(const QString& wellPathName) const;
|
||||
void addWellLogs(const QStringList& filePaths);
|
||||
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
|
||||
void scheduleGeometryRegenAndRedrawViews();
|
||||
void updateFilePathsFromProjectPath();
|
||||
protected:
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
|
||||
private:
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
void readAndAddWellPaths(std::vector<RimWellPath*>& wellPathArray);
|
||||
void sortWellsByName();
|
||||
|
||||
caf::PdmPointer<RimProject> m_project;
|
||||
cvf::ref<RivWellPathCollectionPartMgr> m_wellPathCollectionPartManager;
|
||||
|
Loading…
Reference in New Issue
Block a user