diff --git a/src/i0mmtopobarchart.cpp b/src/i0mmtopobarchart.cpp index 30e518d15275c3db0dcf5c9317a8b80dc786739d..dac6d87503ff86a8c8632f917b9cdc5db1681067 100644 --- a/src/i0mmtopobarchart.cpp +++ b/src/i0mmtopobarchart.cpp @@ -134,9 +134,11 @@ void I0MMTopoBarChart::update(const QList<CuData> &dl) { m_error(error); // show or hide error message m_cur_data = dl; // save data - m_min = m_min - (m_max-m_min) * 0.01; m_max = m_max + (m_max-m_min) * 0.01; + const double d = m_max - m_min; + m_min = m_min - d * 0.01; m_max = m_max + d * 0.01; if(m_min <= 0 && m_barchart->baseline() > 0) m_min= 0.01; // log scale - setAxisScale(QwtPlot::xBottom, m_min, m_max); + if(axisScaleDiv(QwtPlot::xBottom).lowerBound() != m_min || axisScaleDiv(QwtPlot::xBottom).upperBound() != m_max) + setAxisScale(QwtPlot::xBottom, m_min, m_max); } void I0MMTopoBarChart::clear() {