#1633 Removing option for selected and checked wells, now only option is selected wells if selecting well paths.

This commit is contained in:
astridkbjorke 2017-06-22 14:34:49 +02:00
parent 53917c6195
commit df8f45c649
3 changed files with 10 additions and 11 deletions

View File

@ -35,7 +35,6 @@ namespace caf
addItem(RicExportCompletionDataSettingsUi::ALL_WELLS, "ALL_WELLS", "All Wells");
addItem(RicExportCompletionDataSettingsUi::CHECKED_WELLS, "CHECKED_WELLS", "Checked Wells");
addItem(RicExportCompletionDataSettingsUi::SELECTED_WELLS, "SELECTED_WELLS", "Selected Wells");
addItem(RicExportCompletionDataSettingsUi::CHECKED_AND_SELECTED_WELLS, "CHECKED_AND_SELECTED_WELLS", "Checked and Selected Wells");
setDefault(RicExportCompletionDataSettingsUi::ALL_WELLS);
}
@ -109,7 +108,6 @@ QList<caf::PdmOptionItemInfo> RicExportCompletionDataSettingsUi::calculateValueO
else
{
options.push_back(caf::PdmOptionItemInfo("Selected Wells", SELECTED_WELLS));
options.push_back(caf::PdmOptionItemInfo("Selected and Checked Wells", CHECKED_AND_SELECTED_WELLS));
}
}
else

View File

@ -42,7 +42,6 @@ public:
ALL_WELLS,
CHECKED_WELLS,
SELECTED_WELLS,
CHECKED_AND_SELECTED_WELLS
};
typedef caf::AppEnum<WellSelection> WellSelectionType;

View File

@ -122,14 +122,17 @@ std::vector<RimWellPath*> RicWellPathExportCompletionDataFeature::selectedWellPa
std::vector<RimWellPath*> wellPaths;
caf::SelectionManager::instance()->objectsByType(&wellPaths);
std::vector<RimWellPathCollection*> wellPathCollections;
caf::SelectionManager::instance()->objectsByType(&wellPathCollections);
for (auto wellPathCollection : wellPathCollections)
if (wellPaths.empty())
{
for (auto wellPath : wellPathCollection->wellPaths())
std::vector<RimWellPathCollection*> wellPathCollections;
caf::SelectionManager::instance()->objectsByType(&wellPathCollections);
for (auto wellPathCollection : wellPathCollections)
{
wellPaths.push_back(wellPath);
for (auto wellPath : wellPathCollection->wellPaths())
{
wellPaths.push_back(wellPath);
}
}
}
@ -169,8 +172,7 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
{
usedWellPaths = wellPaths;
}
else if (exportSettings.wellSelection == RicExportCompletionDataSettingsUi::CHECKED_WELLS
|| exportSettings.wellSelection == RicExportCompletionDataSettingsUi::CHECKED_AND_SELECTED_WELLS)
else if (exportSettings.wellSelection == RicExportCompletionDataSettingsUi::CHECKED_WELLS)
{
for (auto wellPath : wellPaths)
{