#1178 Update well allocation plots when well color changes

This commit is contained in:
Magne Sjaastad 2017-02-10 19:12:21 +01:00
parent b3e845ed5e
commit d1743be8e7
3 changed files with 29 additions and 0 deletions

View File

@ -119,6 +119,11 @@ void RimEclipseWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
RiuMainWindow::instance()->refreshDrawStyleActions(); RiuMainWindow::instance()->refreshDrawStyleActions();
} }
if (changedField == &wellPipeColor)
{
RimEclipseWellCollection::updateWellAllocationPlots();
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -30,6 +30,8 @@
#include "RimEclipseCase.h" #include "RimEclipseCase.h"
#include "RimEclipseView.h" #include "RimEclipseView.h"
#include "RimEclipseWell.h" #include "RimEclipseWell.h"
#include "RimProject.h"
#include "RimWellAllocationPlot.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
@ -435,6 +437,8 @@ void RimEclipseWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* chang
if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw(); if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw();
RimEclipseWellCollection::updateWellAllocationPlots();
m_applySingleColorToWells = false; m_applySingleColorToWells = false;
} }
@ -472,6 +476,24 @@ void RimEclipseWellCollection::assignDefaultWellColors()
well->updateConnectedEditors(); well->updateConnectedEditors();
} }
} }
RimEclipseWellCollection::updateWellAllocationPlots();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipseWellCollection::updateWellAllocationPlots()
{
RimProject* proj = RiaApplication::instance()->project();
std::vector<RimWellAllocationPlot*> wellAllocationPlots;
proj->descendantsIncludingThisOfType(wellAllocationPlots);
for (auto wap : wellAllocationPlots)
{
wap->loadDataAndUpdate();
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -122,6 +122,8 @@ public:
void assignDefaultWellColors(); void assignDefaultWellColors();
static void updateWellAllocationPlots();
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;