mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1440 Merge dev into pre-proto (WellPath viz restructure and constness)
Had to do quite a bit constness fiddeling to make the merge work
This commit is contained in:
@@ -37,8 +37,6 @@
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "RivWellPathCollectionPartMgr.h"
|
||||
|
||||
#include "RifWellPathImporter.h"
|
||||
|
||||
#include "cafPdmUiEditorHandle.h"
|
||||
@@ -50,6 +48,7 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <cmath>
|
||||
#include "RivWellPathPartMgr.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@@ -94,8 +93,6 @@ RimWellPathCollection::RimWellPathCollection()
|
||||
|
||||
wellPaths.uiCapability()->setUiHidden(true);
|
||||
|
||||
m_wellPathCollectionPartManager = new RivWellPathCollectionPartMgr(this);
|
||||
|
||||
m_wellPathImporter = new RifWellPathImporter;
|
||||
}
|
||||
|
||||
@@ -115,7 +112,7 @@ RimWellPathCollection::~RimWellPathCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
scheduleGeometryRegenAndRedrawViews();
|
||||
scheduleRedrawAffectedViews();
|
||||
}
|
||||
|
||||
|
||||
@@ -327,14 +324,51 @@ caf::PdmFieldHandle* RimWellPathCollection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::scheduleGeometryRegenAndRedrawViews()
|
||||
void RimWellPathCollection::scheduleRedrawAffectedViews()
|
||||
{
|
||||
m_wellPathCollectionPartManager->scheduleGeometryRegen();
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::appendStaticGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
double characteristicCellSize,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform)
|
||||
{
|
||||
if (!this->isActive()) return;
|
||||
if (this->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return;
|
||||
|
||||
for (size_t wIdx = 0; wIdx < this->wellPaths.size(); wIdx++)
|
||||
{
|
||||
RivWellPathPartMgr* partMgr = this->wellPaths[wIdx]->partMgr();
|
||||
partMgr->appendStaticGeometryPartsToModel(model, characteristicCellSize, wellPathClipBoundingBox, displayCoordTransform);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
const QDateTime& timeStamp,
|
||||
double characteristicCellSize,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform)
|
||||
|
||||
{
|
||||
if (!this->isActive()) return;
|
||||
if (this->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return;
|
||||
|
||||
for (size_t wIdx = 0; wIdx < this->wellPaths.size(); wIdx++)
|
||||
{
|
||||
RivWellPathPartMgr* partMgr = this->wellPaths[wIdx]->partMgr();
|
||||
partMgr->appendDynamicGeometryPartsToModel(model, timeStamp, characteristicCellSize, wellPathClipBoundingBox, displayCoordTransform);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user