#1807 Ensure flow characteristics plot is updated when view geometry changes when using visible cells filtering

This commit is contained in:
Bjørnar Grip Fjær 2017-08-24 13:28:17 +02:00
parent dbee70b222
commit 78760d569e
3 changed files with 26 additions and 0 deletions

View File

@ -627,6 +627,18 @@ void RimFlowCharacteristicsPlot::loadDataAndUpdate()
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimFlowCharacteristicsPlot::viewGeometryUpdated()
{
if (m_cellFilter() == RigFlowDiagResults::CELLS_VISIBLE)
{
// Only need to reload data if cell filtering is based on visible cells in view.
loadDataAndUpdate();
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -67,6 +67,8 @@ public:
virtual void deleteViewWidget() override; virtual void deleteViewWidget() override;
virtual void loadDataAndUpdate() override; virtual void loadDataAndUpdate() override;
void viewGeometryUpdated();
enum TimeSelectionType enum TimeSelectionType
{ {
ALL_AVAILABLE, ALL_AVAILABLE,

View File

@ -57,6 +57,7 @@
#include "RimViewController.h" #include "RimViewController.h"
#include "RimViewLinker.h" #include "RimViewLinker.h"
#include "RimWellPathCollection.h" #include "RimWellPathCollection.h"
#include "RimFlowCharacteristicsPlot.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
#include "RiuSelectionManager.h" #include "RiuSelectionManager.h"
@ -494,6 +495,17 @@ void RimEclipseView::createDisplayModel()
m_overlayInfoConfig()->update3DInfo(); m_overlayInfoConfig()->update3DInfo();
updateLegends(); updateLegends();
} }
std::vector<caf::PdmFieldHandle*> objects;
this->referringPtrFields(objects);
for (auto object : objects)
{
RimFlowCharacteristicsPlot* plot = dynamic_cast<RimFlowCharacteristicsPlot*>(object->ownerObject());
if (plot != nullptr)
{
plot->viewGeometryUpdated();
}
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------