#2448 Summary plot: Retain auto zoom for axes you haven't modified the range for.

This commit is contained in:
Gaute Lindkvist
2018-05-11 13:18:53 +02:00
parent 9f1ea2c42a
commit f0be8214b0
6 changed files with 182 additions and 126 deletions

View File

@@ -83,6 +83,7 @@ RimSummaryAxisProperties::RimSummaryAxisProperties()
numberOfDecimals.uiCapability()->setUiEditorTypeName(caf::PdmUiSliderEditor::uiEditorTypeName());
CAF_PDM_InitField(&m_isAutoZoom, "AutoZoom", true, "Set Range Automatically", "", "", "");
CAF_PDM_InitField(&isLogarithmicScaleEnabled, "LogarithmicScale", false, "Logarithmic Scale", "", "", "");
updateOptionSensitivity();
@@ -251,6 +252,22 @@ bool RimSummaryAxisProperties::showUnitText() const
return m_displayUnitText();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimSummaryAxisProperties::isAutoZoom() const
{
return m_isAutoZoom();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryAxisProperties::setAutoZoom(bool enableAutoZoom)
{
m_isAutoZoom = enableAutoZoom;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -278,13 +295,13 @@ void RimSummaryAxisProperties::fieldChangedByUi(const caf::PdmFieldHandle* chang
{
if (visibleRangeMin > visibleRangeMax) visibleRangeMax = oldValue.toDouble();
rimSummaryPlot->disableAutoZoom();
m_isAutoZoom = false;
}
else if (changedField == &visibleRangeMin)
{
if (visibleRangeMin > visibleRangeMax) visibleRangeMin = oldValue.toDouble();
rimSummaryPlot->disableAutoZoom();
m_isAutoZoom = false;
}
if (changedField == &isLogarithmicScaleEnabled)