#5125 Only update relevant grid view on well measurement changes.

This commit is contained in:
Kristian Bendiksen 2019-11-27 22:09:31 +01:00
parent 660d68a4d1
commit ad9c767a36

View File

@ -18,6 +18,7 @@
#include "RimWellMeasurementInViewCollection.h" #include "RimWellMeasurementInViewCollection.h"
#include "Rim3dView.h" #include "Rim3dView.h"
#include "RimGridView.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimRegularLegendConfig.h" #include "RimRegularLegendConfig.h"
#include "RimTools.h" #include "RimTools.h"
@ -83,13 +84,10 @@ void RimWellMeasurementInViewCollection::fieldChangedByUi( const caf::PdmFieldHa
const QVariant& oldValue, const QVariant& oldValue,
const QVariant& newValue ) const QVariant& newValue )
{ {
if ( changedField == &m_isChecked || changedField == &m_measurementKinds || changedField == &m_legendConfig ) updateLegendData();
{ RimGridView* rimGridView = nullptr;
updateLegendData(); this->firstAncestorOrThisOfTypeAsserted( rimGridView );
RimProject* proj; rimGridView->scheduleCreateDisplayModelAndRedraw();
this->firstAncestorOrThisOfTypeAsserted( proj );
proj->scheduleCreateDisplayModelAndRedrawAllViews();
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------