mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make sure changes to valves and perforation interval visibility is reflected in track.
This commit is contained in:
parent
4591d9f20e
commit
e67a9ef12a
@ -25,6 +25,7 @@
|
||||
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathValve.h"
|
||||
|
||||
@ -233,6 +234,21 @@ std::vector<RimWellPathValve*> RimPerforationInterval::valves() const
|
||||
return allValves;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::updateAllReferringTracks()
|
||||
{
|
||||
std::vector<RimWellLogTrack*> wellLogTracks;
|
||||
|
||||
this->objectsWithReferringPtrFieldsOfType(wellLogTracks);
|
||||
for (RimWellLogTrack* track : wellLogTracks)
|
||||
{
|
||||
track->loadDataAndUpdate();
|
||||
}
|
||||
this->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -298,6 +314,8 @@ void RimPerforationInterval::fieldChangedByUi(const caf::PdmFieldHandle* changed
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
this->updateAllReferringTracks();
|
||||
|
||||
RimProject* proj = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
|
@ -68,6 +68,7 @@ public:
|
||||
|
||||
void addValve(RimWellPathValve* valve);
|
||||
std::vector<RimWellPathValve*> valves() const;
|
||||
void updateAllReferringTracks();
|
||||
|
||||
// RimWellPathCompletionInterface overrides
|
||||
bool isEnabled() const override;
|
||||
|
@ -311,6 +311,10 @@ QList<caf::PdmOptionItemInfo> RimWellPathValve::calculateValueOptions(const caf:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathValve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
RimPerforationInterval* perfInterval;
|
||||
this->firstAncestorOrThisOfTypeAsserted(perfInterval);
|
||||
perfInterval->updateAllReferringTracks();
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
|
Loading…
Reference in New Issue
Block a user