#3268 MSW Fracture Export : Do not export empty file when no fishbones are present

This commit is contained in:
Magne Sjaastad
2018-09-07 13:01:57 +02:00
parent 1946d88c63
commit dcdd8cce2a
2 changed files with 4 additions and 6 deletions

View File

@@ -85,12 +85,8 @@ void RicfExportMsw::execute()
return;
}
std::vector<RimFishbonesMultipleSubs*> fishbonesSubs;
for (RimFishbonesMultipleSubs* fishbones : wellPath->fishbonesCollection()->activeFishbonesSubs())
if (!wellPath->fishbonesCollection()->activeFishbonesSubs().empty())
{
fishbonesSubs.push_back(fishbones);
RicExportFishbonesWellSegmentsFeature::exportWellSegments(wellPath, wellPath->fishbonesCollection()->activeFishbonesSubs(), exportSettings);
}
RicExportFishbonesWellSegmentsFeature::exportWellSegments(wellPath, fishbonesSubs, exportSettings);
}

View File

@@ -122,6 +122,8 @@ bool RicExportFishbonesWellSegmentsFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicExportFishbonesWellSegmentsFeature::exportWellSegments(const RimWellPath* wellPath, const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs, const RicCaseAndFileExportSettingsUi& settings)
{
if (fishbonesSubs.empty()) return;
if (settings.caseToApply() == nullptr)
{
RiaLogging::error("Export Well Segments: Cannot export completions data without specified eclipse case");