Add option to avoid updating parent plot

This commit is contained in:
Rebecca Cox 2018-01-29 10:16:12 +01:00
parent 41506afe06
commit 0171589c72
2 changed files with 8 additions and 5 deletions

View File

@ -135,7 +135,7 @@ void RimPlotCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, con
{
if (changedField == &m_showCurve)
{
this->updateCurveVisibility();
this->updateCurveVisibility(true);
if (m_showCurve()) loadDataAndUpdate(true);
}
else if (changedField == &m_curveName)
@ -180,7 +180,7 @@ caf::PdmFieldHandle* RimPlotCurve::objectToggleField()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPlotCurve::updateCurveVisibility()
void RimPlotCurve::updateCurveVisibility(bool updateParent)
{
bool isVisibleInPossibleParent = true;
@ -199,7 +199,10 @@ void RimPlotCurve::updateCurveVisibility()
m_qwtPlotCurve->detach();
}
updateZoomInParentPlot();
if (updateParent)
{
updateZoomInParentPlot();
}
}
//--------------------------------------------------------------------------------------------------
@ -207,7 +210,7 @@ void RimPlotCurve::updateCurveVisibility()
//--------------------------------------------------------------------------------------------------
void RimPlotCurve::updateCurvePresentation(bool updatePlotLegend)
{
this->updateCurveVisibility();
this->updateCurveVisibility(updatePlotLegend);
if (updatePlotLegend)
{

View File

@ -92,7 +92,7 @@ public:
QString curveName() const { return m_curveName; }
void updateCurveVisibility();
void updateCurveVisibility(bool updateParent);
void updateLegendEntryVisibilityAndPlotLegend();
void updateLegendEntryVisibilityNoPlotUpdate();