mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-04 21:27:04 -06:00
#2027 Select formation name on formation name import
This commit is contained in:
1 parent
53912c4152
commit
9bd60ebec2
3 files changed
+24
-6
No files matched your search
@@ -58,11 +58,12 @@ void RimFormationNamesCollection::readAllFormationNames()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFormationNamesCollection::importFiles(const QStringList& fileNames)
|
||||
RimFormationNames* RimFormationNamesCollection::importFiles(const QStringList& fileNames)
|
||||
{
|
||||
QStringList newFileNames;
|
||||
std::vector<RimFormationNames*> formNamesObjsToReload;
|
||||
|
||||
size_t formationListBeforeImportCount = m_formationNamesList.size();
|
||||
|
||||
for(const QString& newFileName : fileNames)
|
||||
{
|
||||
bool isFound = false;
|
||||
@@ -108,6 +109,16 @@ void RimFormationNamesCollection::importFiles(const QStringList& fileNames)
|
||||
{
|
||||
QMessageBox::warning(nullptr, "Import Formation Names", totalErrorMessage);
|
||||
}
|
||||
|
||||
if (m_formationNamesList.size() > formationListBeforeImportCount)
|
||||
{
|
||||
return m_formationNamesList[m_formationNamesList.size() - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user