Header and white space cleanup

This commit is contained in:
Magne Sjaastad
2018-10-26 13:25:36 +02:00
parent 7813527a33
commit 4a07398871
2 changed files with 22 additions and 26 deletions

View File

@@ -85,9 +85,8 @@ bool RicCreateTemporaryLgrFeature::isCommandEnabled()
void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked) void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
{ {
std::vector<RimWellPath*> wellPaths = RicExportLgrFeature::selectedWellPaths(); std::vector<RimWellPath*> wellPaths = RicExportLgrFeature::selectedWellPaths();
if(wellPaths.size() == 0) return; if (wellPaths.empty()) return;
std::vector<RimSimWellInView*> simWells;
QString dialogTitle = "Create Temporary LGR"; QString dialogTitle = "Create Temporary LGR";
RimEclipseCase* defaultEclipseCase = nullptr; RimEclipseCase* defaultEclipseCase = nullptr;
@@ -115,16 +114,10 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
bool intersectsExistingLgr = false; bool intersectsExistingLgr = false;
for (const auto& wellPath : wellPaths) for (const auto& wellPath : wellPaths)
{ {
std::vector<LgrInfo> lgrs;
try try
{ {
lgrs = RicExportLgrFeature::buildLgrsForWellPath(wellPath, std::vector<LgrInfo> lgrs = RicExportLgrFeature::buildLgrsForWellPath(
eclipseCase, wellPath, eclipseCase, timeStep, lgrCellCounts, splitType, completionTypes);
timeStep,
lgrCellCounts,
splitType,
completionTypes);
auto mainGrid = eclipseCase->eclipseCaseData()->mainGrid(); auto mainGrid = eclipseCase->eclipseCaseData()->mainGrid();
@@ -143,8 +136,10 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
mainGrid->calculateFaults(activeCellInfo, true); mainGrid->calculateFaults(activeCellInfo, true);
} }
catch (CreateLgrException e) catch (CreateLgrException& e)
{ {
RiaLogging::error(e.message);
intersectsExistingLgr = true; intersectsExistingLgr = true;
} }
} }
@@ -189,7 +184,7 @@ void RicCreateTemporaryLgrFeature::setupActionLook(QAction* actionToSetup)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Todo: Guarding, caching LGR corner nodes calculations /// Todo: Guarding, caching LGR corner nodes calculations
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicCreateTemporaryLgrFeature::createLgr(LgrInfo& lgrInfo, RigMainGrid* mainGrid) void RicCreateTemporaryLgrFeature::createLgr(const LgrInfo& lgrInfo, RigMainGrid* mainGrid)
{ {
auto app = RiaApplication::instance(); auto app = RiaApplication::instance();
auto eclipseView = dynamic_cast<RimEclipseView*>(app->activeReservoirView()); auto eclipseView = dynamic_cast<RimEclipseView*>(app->activeReservoirView());

View File

@@ -19,10 +19,12 @@
#pragma once #pragma once
#include "RigCompletionDataGridCell.h" #include "RigCompletionDataGridCell.h"
#include "cafCmdFeature.h" #include "cafCmdFeature.h"
#include <cafVecIjk.h> #include "cafVecIjk.h"
#include <memory>
#include <limits> #include <limits>
#include <memory>
class LgrInfo; class LgrInfo;
class RigMainGrid; class RigMainGrid;
@@ -33,7 +35,6 @@ class RicExportLgrUi;
class QFile; class QFile;
class QTextStream; class QTextStream;
//================================================================================================== //==================================================================================================
/// ///
//================================================================================================== //==================================================================================================
@@ -42,12 +43,12 @@ class RicCreateTemporaryLgrFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT; CAF_CMD_HEADER_INIT;
protected: protected:
virtual bool isCommandEnabled() override; bool isCommandEnabled() override;
virtual void onActionTriggered(bool isChecked) override; void onActionTriggered(bool isChecked) override;
virtual void setupActionLook(QAction* actionToSetup) override; void setupActionLook(QAction* actionToSetup) override;
private: private:
static void createLgr(LgrInfo& lgrInfo, RigMainGrid* mainGrid); static void createLgr(const LgrInfo& lgrInfo, RigMainGrid* mainGrid);
static void computeCachedData(RimEclipseCase* eclipseCase); static void computeCachedData(RimEclipseCase* eclipseCase);
static void deleteAllCachedData(RimEclipseCase* eclipseCase); static void deleteAllCachedData(RimEclipseCase* eclipseCase);
static bool containsAnyNonMainGridCells(const std::vector<RigCompletionDataGridCell>& cells); static bool containsAnyNonMainGridCells(const std::vector<RigCompletionDataGridCell>& cells);