@@ -106,7 +106,9 QLogValueAxis::QLogValueAxis(QLogValueAxisPrivate &d, QObject *parent) : QAbstra | |||
|
106 | 106 | */ |
|
107 | 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 | 114 | void QLogValueAxis::setMin(qreal min) |
@@ -209,7 +211,7 QAbstractAxis::AxisType QLogValueAxis::type() const | |||
|
209 | 211 | QLogValueAxisPrivate::QLogValueAxisPrivate(QLogValueAxis *q) |
|
210 | 212 | : QAbstractAxisPrivate(q), |
|
211 | 213 | m_min(1), |
|
212 |
m_max(1 |
|
|
214 | m_max(1), | |
|
213 | 215 | m_base(10), |
|
214 | 216 | m_format(QString::null) |
|
215 | 217 | { |
@@ -298,16 +300,20 void QLogValueAxisPrivate::initializeDomain(AbstractDomain *domain) | |||
|
298 | 300 | if(!qFuzzyCompare(m_max, m_min)) { |
|
299 | 301 | domain->setRangeY(m_min, m_max); |
|
300 | 302 | } |
|
301 | else { | |
|
302 |
setRange(domain->minY() |
|
|
303 | else if ( domain->minY() > 0) { | |
|
304 | setRange(domain->minY(), domain->maxY()); | |
|
305 | } else { | |
|
306 | domain->setRangeY(m_min, domain->maxY()); | |
|
303 | 307 | } |
|
304 | 308 | } |
|
305 | 309 | if (orientation() == Qt::Horizontal) { |
|
306 | 310 | if(!qFuzzyCompare(m_max, m_min)) { |
|
307 | 311 | domain->setRangeX(m_min, m_max); |
|
308 | 312 | } |
|
309 | else { | |
|
310 |
setRange(domain->minX() |
|
|
313 | else if (domain->minX() > 0){ | |
|
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