mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#559 : Linked Views: Linking legend definitions
This commit is contained in:
@@ -19,15 +19,17 @@
|
||||
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimViewLinker.h"
|
||||
|
||||
#include "RivTernarySaturationOverlayItem.h"
|
||||
#include "RivTernaryScalarMapper.h"
|
||||
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
|
||||
#include "cvfqtUtils.h"
|
||||
|
||||
#include <cmath>
|
||||
@@ -152,6 +154,18 @@ void RimTernaryLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changed
|
||||
updateLabelText();
|
||||
updateLegend();
|
||||
|
||||
RimView* view = nullptr;
|
||||
this->firstAncestorOrThisOfType(view);
|
||||
|
||||
if (view)
|
||||
{
|
||||
RimViewLinker* viewLinker = view->assosiatedViewLinker();
|
||||
if (viewLinker)
|
||||
{
|
||||
viewLinker->updateCellResult();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_reservoirView) m_reservoirView->updateCurrentTimeStepAndRedraw();
|
||||
}
|
||||
|
||||
@@ -231,6 +245,24 @@ void RimTernaryLegendConfig::recreateLegend()
|
||||
updateLegend();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTernaryLegendConfig::setUiValuesFromLegendConfig(const RimTernaryLegendConfig* otherLegendConfig)
|
||||
{
|
||||
this->precision = otherLegendConfig->precision;
|
||||
this->rangeMode = otherLegendConfig->rangeMode;
|
||||
this->userDefinedMaxValueSoil = otherLegendConfig->userDefinedMaxValueSoil;
|
||||
this->userDefinedMinValueSoil = otherLegendConfig->userDefinedMinValueSoil;
|
||||
this->userDefinedMaxValueSgas = otherLegendConfig->userDefinedMaxValueSgas;
|
||||
this->userDefinedMinValueSgas = otherLegendConfig->userDefinedMinValueSgas;
|
||||
this->userDefinedMaxValueSwat = otherLegendConfig->userDefinedMaxValueSwat;
|
||||
this->userDefinedMinValueSwat = otherLegendConfig->userDefinedMinValueSwat;
|
||||
this->applyLocalMinMax = otherLegendConfig->applyLocalMinMax;
|
||||
this->applyGlobalMinMax = otherLegendConfig->applyGlobalMinMax;
|
||||
this->applyFullRangeMinMax = otherLegendConfig->applyFullRangeMinMax;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Rounding the double value to given number of significant digits
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user