#1386 Fixed crash when pasting eclipse case into grid case group

This commit is contained in:
Bjørnar Grip Fjær
2017-03-31 11:10:22 +02:00
parent c7f008ca2f
commit 6c04daf333
2 changed files with 25 additions and 2 deletions

View File

@@ -20,12 +20,14 @@
#include "RigMainGrid.h"
#include "cvfAssert.h"
#include "RiaLogging.h"
#include "RimDefines.h"
#include "RigFault.h"
#include "cvfBoundingBoxTree.h"
#include "RigActiveCellInfo.h"
#include "cvfBoundingBoxTree.h"
#include "cvfAssert.h"
RigMainGrid::RigMainGrid(void)
: RigGridBase(this)
@@ -215,12 +217,32 @@ void RigMainGrid::setFaults(const cvf::Collection<RigFault>& faults)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigMainGrid::hasFaultWithName(const QString& name) const
{
for (auto fault : m_faults)
{
if (fault->name() == name)
{
return true;
}
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigMainGrid::calculateFaults(const RigActiveCellInfo* activeCellInfo)
{
if (hasFaultWithName(RimDefines::undefinedGridFaultName())
&& hasFaultWithName(RimDefines::undefinedGridFaultWithInactiveName()))
{
RiaLogging::debug(QString("Calculate faults already run for grid."));
return;
}
m_faultsPrCellAcc = new RigFaultsPrCellAccumulator(m_cells.size());
// Spread fault idx'es on the cells from the faults

View File

@@ -81,6 +81,7 @@ private:
void initAllSubGridsParentGridPointer();
void initAllSubCellsMainGridCellIndex();
void buildCellSearchTree();
bool hasFaultWithName(const QString& name) const;
private:
std::vector<cvf::Vec3d> m_nodes; ///< Global vertex table