#2425 Export Completions : Whitespace

This commit is contained in:
Magne Sjaastad 2018-01-31 08:41:23 +01:00
parent c04ef6bbbf
commit f8b020e364
2 changed files with 34 additions and 98 deletions

View File

@ -20,53 +20,22 @@
#include "RicWellPathExportCompletionDataFeatureImpl.h"
#include "RiaApplication.h"
#include "RiaLogging.h"
#include "RiaPreferences.h"
#include "RicExportCompletionDataSettingsUi.h"
#include "RicExportFeatureImpl.h"
#include "RicFishbonesTransmissibilityCalculationFeatureImp.h"
#include "RicExportFractureCompletionsImpl.h"
#include "RigActiveCellInfo.h"
#include "RigCaseCellResultsData.h"
#include "RigEclipseCaseData.h"
#include "RigMainGrid.h"
#include "RigResultAccessorFactory.h"
#include "RigTransmissibilityEquations.h"
#include "RigWellLogExtractionTools.h"
#include "RigWellPath.h"
#include "RigWellPathIntersectionTools.h"
#include "RimDialogData.h"
#include "RimSimWellInViewCollection.h"
#include "RimFishboneWellPath.h"
#include "RimFishboneWellPathCollection.h"
#include "RimFishbonesCollection.h"
#include "RimFishbonesMultipleSubs.h"
#include "RimPerforationCollection.h"
#include "RimPerforationInterval.h"
#include "RimProject.h"
#include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RimWellPathCompletions.h"
#include "RiuMainWindow.h"
#include "cafPdmUiPropertyViewDialog.h"
#include "cafProgressInfo.h"
#include "cafSelectionManager.h"
#include "cvfPlane.h"
#include <QAction>
#include <QDir>
#include <QFileDialog>
#include <QMessageBox>
#include "RigWellLogExtractor.h"
CAF_CMD_SOURCE_INIT(RicWellPathExportCompletionDataFeature, "RicWellPathExportCompletionDataFeature");
@ -75,8 +44,8 @@ CAF_CMD_SOURCE_INIT(RicWellPathExportCompletionDataFeature, "RicWellPathExportCo
//--------------------------------------------------------------------------------------------------
bool RicWellPathExportCompletionDataFeature::isCommandEnabled()
{
std::vector<RimWellPath*> wellPaths = selectedWellPaths();
std::vector<RimSimWellInView*> simWells = selectedSimWells();
std::vector<RimWellPath*> wellPaths = selectedWellPaths();
std::vector<RimSimWellInView*> simWells = selectedSimWells();
if (wellPaths.empty() && simWells.empty())
{
@ -108,19 +77,20 @@ bool RicWellPathExportCompletionDataFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicWellPathExportCompletionDataFeature::onActionTriggered(bool isChecked)
{
std::vector<RimWellPath*> wellPaths = selectedWellPaths();
std::vector<RimSimWellInView*> simWells = selectedSimWells();
std::vector<RimWellPath*> wellPaths = selectedWellPaths();
std::vector<RimSimWellInView*> simWells = selectedSimWells();
CVF_ASSERT(wellPaths.size() > 0 || simWells.size() > 0);
RiaApplication* app = RiaApplication::instance();
RimProject* project = app->project();
RiaApplication* app = RiaApplication::instance();
RimProject* project = app->project();
QString projectFolder = app->currentProjectPath();
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("COMPLETIONS", projectFolder);
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("COMPLETIONS", projectFolder);
bool onlyWellPathCollectionSelected = noWellPathsSelectedDirectly();
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData(onlyWellPathCollectionSelected);
bool onlyWellPathCollectionSelected = noWellPathsSelectedDirectly();
RicExportCompletionDataSettingsUi* exportSettings =
project->dialogData()->exportCompletionData(onlyWellPathCollectionSelected);
if (wellPaths.empty())
{
@ -146,7 +116,7 @@ void RicWellPathExportCompletionDataFeature::onActionTriggered(bool isChecked)
}
}
if(exportSettings->folder().isEmpty()) exportSettings->folder = defaultDir;
if (exportSettings->folder().isEmpty()) exportSettings->folder = defaultDir;
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), exportSettings, "Export Completion Data", "");
RicExportFeatureImpl::configureForExport(&propertyDialog);
@ -202,8 +172,10 @@ bool RicWellPathExportCompletionDataFeature::noWellPathsSelectedDirectly()
std::vector<RimWellPath*> wellPaths;
caf::SelectionManager::instance()->objectsByType(&wellPaths);
if (wellPaths.empty()) return true;
else return false;
if (wellPaths.empty())
return true;
else
return false;
}
//--------------------------------------------------------------------------------------------------
@ -230,21 +202,3 @@ std::vector<RimSimWellInView*> RicWellPathExportCompletionDataFeature::selectedS
return simWells;
}

View File

@ -18,24 +18,8 @@
#pragma once
#include "RifEclipseDataTableFormatter.h"
#include "RigWellLogExtractionTools.h"
#include "RigWellPathIntersectionTools.h"
#include "RigCompletionData.h"
#include "RicExportCompletionDataSettingsUi.h"
#include "cafCmdFeature.h"
#include "cvfBoundingBox.h"
class RigCell;
class RigEclipseCaseData;
class RigMainGrid;
class RimEclipseCase;
class RimFishbonesMultipleSubs;
class RimSimWellInView;
class RimWellPath;
@ -52,10 +36,8 @@ protected:
virtual void setupActionLook(QAction* actionToSetup) override;
private:
std::vector<RimWellPath*> selectedWellPaths();
std::vector<RimSimWellInView*> selectedSimWells();
std::vector<RimWellPath*> selectedWellPaths();
std::vector<RimSimWellInView*> selectedSimWells();
bool noWellPathsSelectedDirectly();
bool noWellPathsSelectedDirectly();
};