mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4267 Fix crash when exporting sector model from grid that was imported from GRDECL
This commit is contained in:
parent
3b8daa4939
commit
8f6a0f8177
@ -90,10 +90,13 @@ RicExportEclipseSectorModelUi::RicExportEclipseSectorModelUi(RigEclipseCaseData*
|
||||
exportFaultsFilename = defaultFaultsFileName();
|
||||
|
||||
for (QString keyword : mainKeywords())
|
||||
{
|
||||
if (caseData->results(RiaDefines::MATRIX_MODEL)->hasResultEntry(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, keyword)))
|
||||
{
|
||||
exportMainKeywords.v().push_back(keyword);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -257,11 +260,14 @@ QList<caf::PdmOptionItemInfo>
|
||||
for (caf::PdmOptionItemInfo option : allOptions)
|
||||
{
|
||||
if (mainKeywords.count(option.optionUiText()))
|
||||
{
|
||||
if (resultData->hasResultEntry(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, option.optionUiText())))
|
||||
{
|
||||
options.push_back(option);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &exportAdditionalKeywords)
|
||||
{
|
||||
RigCaseCellResultsData* resultData = m_caseData->results(RiaDefines::MATRIX_MODEL);
|
||||
@ -272,6 +278,8 @@ QList<caf::PdmOptionItemInfo>
|
||||
for (caf::PdmOptionItemInfo option : allOptions)
|
||||
{
|
||||
if (!mainKeywords.count(option.optionUiText()) && option.optionUiText() != "None")
|
||||
{
|
||||
if (resultData->hasResultEntry(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, option.optionUiText())))
|
||||
{
|
||||
if (option.optionUiText() == "ACTNUM" && exportGrid())
|
||||
{
|
||||
@ -285,6 +293,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &exportFaults)
|
||||
{
|
||||
std::set<ResultExportOptions> validFaultOptions = { EXPORT_NO_RESULTS, EXPORT_TO_GRID_FILE, EXPORT_TO_SINGLE_SEPARATE_FILE };
|
||||
|
Loading…
Reference in New Issue
Block a user