@@ -106,7 +106,9 QLogValueAxis::QLogValueAxis(QLogValueAxisPrivate &d, QObject *parent) : QAbstra | |||||
106 | */ |
|
106 | */ | |
107 | QLogValueAxis::~QLogValueAxis() |
|
107 | QLogValueAxis::~QLogValueAxis() | |
108 | { |
|
108 | { | |
109 |
|
109 | Q_D(QLogValueAxis); | ||
|
110 | if (d->m_chart) | |||
|
111 | d->m_chart->removeAxis(this); | |||
110 | } |
|
112 | } | |
111 |
|
113 | |||
112 | void QLogValueAxis::setMin(qreal min) |
|
114 | void QLogValueAxis::setMin(qreal min) | |
@@ -209,7 +211,7 QAbstractAxis::AxisType QLogValueAxis::type() const | |||||
209 | QLogValueAxisPrivate::QLogValueAxisPrivate(QLogValueAxis *q) |
|
211 | QLogValueAxisPrivate::QLogValueAxisPrivate(QLogValueAxis *q) | |
210 | : QAbstractAxisPrivate(q), |
|
212 | : QAbstractAxisPrivate(q), | |
211 | m_min(1), |
|
213 | m_min(1), | |
212 |
m_max(1 |
|
214 | m_max(1), | |
213 | m_base(10), |
|
215 | m_base(10), | |
214 | m_format(QString::null) |
|
216 | m_format(QString::null) | |
215 | { |
|
217 | { | |
@@ -298,16 +300,20 void QLogValueAxisPrivate::initializeDomain(AbstractDomain *domain) | |||||
298 | if(!qFuzzyCompare(m_max, m_min)) { |
|
300 | if(!qFuzzyCompare(m_max, m_min)) { | |
299 | domain->setRangeY(m_min, m_max); |
|
301 | domain->setRangeY(m_min, m_max); | |
300 | } |
|
302 | } | |
301 | else { |
|
303 | else if ( domain->minY() > 0) { | |
302 |
setRange(domain->minY() |
|
304 | setRange(domain->minY(), domain->maxY()); | |
|
305 | } else { | |||
|
306 | domain->setRangeY(m_min, domain->maxY()); | |||
303 | } |
|
307 | } | |
304 | } |
|
308 | } | |
305 | if (orientation() == Qt::Horizontal) { |
|
309 | if (orientation() == Qt::Horizontal) { | |
306 | if(!qFuzzyCompare(m_max, m_min)) { |
|
310 | if(!qFuzzyCompare(m_max, m_min)) { | |
307 | domain->setRangeX(m_min, m_max); |
|
311 | domain->setRangeX(m_min, m_max); | |
308 | } |
|
312 | } | |
309 | else { |
|
313 | else if (domain->minX() > 0){ | |
310 |
setRange(domain->minX() |
|
314 | setRange(domain->minX(), domain->maxX()); | |
|
315 | } else { | |||
|
316 | domain->setRangeX(m_min, domain->maxX()); | |||
311 | } |
|
317 | } | |
312 | } |
|
318 | } | |
313 | } |
|
319 | } |
General Comments 0
You need to be logged in to leave comments.
Login now