#2429, #2430. Display perforations correctly

This commit is contained in:
Bjørn Erik Jensen 2018-01-31 15:34:50 +01:00
parent fa66cf14cd
commit 60afae10ad
6 changed files with 26 additions and 2 deletions

View File

@ -1559,6 +1559,8 @@ bool RimEclipseView::isTimeStepDependentDataVisible() const
if (this->faultResultSettings->customFaultResult()->isTernarySaturationSelected()) return true; if (this->faultResultSettings->customFaultResult()->isTernarySaturationSelected()) return true;
} }
if (this->wellPathCollection()->anyWellsContainingPerforationIntervals()) return true;
return false; return false;
} }

View File

@ -320,6 +320,13 @@ void RimSimWellInViewCollection::fieldChangedByUi(const caf::PdmFieldHandle* cha
if (&isActive == changedField) if (&isActive == changedField)
{ {
this->updateUiIconFromToggleField(); this->updateUiIconFromToggleField();
RimView* view;
firstAncestorOrThisOfType(view);
if (view)
{
view->hasUserRequestedAnimation = true;
}
} }
if (&m_showWellLabel == changedField) if (&m_showWellLabel == changedField)

View File

@ -436,7 +436,7 @@ void RimView::endAnimation()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellPathCollection* RimView::wellPathCollection() RimWellPathCollection* RimView::wellPathCollection() const
{ {
RimProject* proj = nullptr; RimProject* proj = nullptr;
this->firstAncestorOrThisOfTypeAsserted(proj); this->firstAncestorOrThisOfTypeAsserted(proj);

View File

@ -210,7 +210,7 @@ protected:
virtual void onLoadDataAndUpdate() = 0; virtual void onLoadDataAndUpdate() = 0;
RimWellPathCollection* wellPathCollection(); RimWellPathCollection* wellPathCollection() const;
QPointer<RiuViewer> m_viewer; QPointer<RiuViewer> m_viewer;

View File

@ -37,6 +37,7 @@
#include "RimProject.h" #include "RimProject.h"
#include "RimWellLogFile.h" #include "RimWellLogFile.h"
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RimPerforationCollection.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
@ -478,6 +479,18 @@ void RimWellPathCollection::updateFilePathsFromProjectPath(const QString& newPro
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellPathCollection::anyWellsContainingPerforationIntervals() const
{
for (const auto& wellPath : wellPaths)
{
if (!wellPath->perforationIntervalCollection()->perforations().empty()) return true;
}
return false;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -122,6 +122,8 @@ public:
const cvf::BoundingBox& wellPathClipBoundingBox, const cvf::BoundingBox& wellPathClipBoundingBox,
const caf::DisplayCoordTransform* displayCoordTransform); const caf::DisplayCoordTransform* displayCoordTransform);
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath); void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
bool anyWellsContainingPerforationIntervals() const;
protected: protected:
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;