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
@ -91,7 +91,10 @@ RicExportEclipseSectorModelUi::RicExportEclipseSectorModelUi(RigEclipseCaseData*
|
|||||||
|
|
||||||
for (QString keyword : mainKeywords())
|
for (QString keyword : mainKeywords())
|
||||||
{
|
{
|
||||||
exportMainKeywords.v().push_back(keyword);
|
if (caseData->results(RiaDefines::MATRIX_MODEL)->hasResultEntry(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, keyword)))
|
||||||
|
{
|
||||||
|
exportMainKeywords.v().push_back(keyword);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +261,10 @@ QList<caf::PdmOptionItemInfo>
|
|||||||
{
|
{
|
||||||
if (mainKeywords.count(option.optionUiText()))
|
if (mainKeywords.count(option.optionUiText()))
|
||||||
{
|
{
|
||||||
options.push_back(option);
|
if (resultData->hasResultEntry(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, option.optionUiText())))
|
||||||
|
{
|
||||||
|
options.push_back(option);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -273,14 +279,17 @@ QList<caf::PdmOptionItemInfo>
|
|||||||
{
|
{
|
||||||
if (!mainKeywords.count(option.optionUiText()) && option.optionUiText() != "None")
|
if (!mainKeywords.count(option.optionUiText()) && option.optionUiText() != "None")
|
||||||
{
|
{
|
||||||
if (option.optionUiText() == "ACTNUM" && exportGrid())
|
if (resultData->hasResultEntry(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, option.optionUiText())))
|
||||||
{
|
{
|
||||||
if (exportResults() != EXPORT_TO_GRID_FILE)
|
if (option.optionUiText() == "ACTNUM" && exportGrid())
|
||||||
options.push_back(caf::PdmOptionItemInfo("ACTNUM (included in Grid File)", "ACTNUM"));
|
{
|
||||||
}
|
if (exportResults() != EXPORT_TO_GRID_FILE)
|
||||||
else
|
options.push_back(caf::PdmOptionItemInfo("ACTNUM (included in Grid File)", "ACTNUM"));
|
||||||
{
|
}
|
||||||
options.push_back(option);
|
else
|
||||||
|
{
|
||||||
|
options.push_back(option);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user