@@ -53,6 +53,7 ChartAxis::ChartAxis(QAbstractAxis *axis, ChartPresenter *presenter, bool interv | |||||
53 | m_labels->setZValue(ChartPresenter::AxisZValue); |
|
53 | m_labels->setZValue(ChartPresenter::AxisZValue); | |
54 | m_shades->setZValue(ChartPresenter::ShadesZValue); |
|
54 | m_shades->setZValue(ChartPresenter::ShadesZValue); | |
55 | m_grid->setZValue(ChartPresenter::GridZValue); |
|
55 | m_grid->setZValue(ChartPresenter::GridZValue); | |
|
56 | m_title->setZValue(ChartPresenter::GridZValue); | |||
56 |
|
57 | |||
57 | QObject::connect(m_chartAxis->d_ptr.data(), SIGNAL(updated()), this, SLOT(handleAxisUpdated())); |
|
58 | QObject::connect(m_chartAxis->d_ptr.data(), SIGNAL(updated()), this, SLOT(handleAxisUpdated())); | |
58 |
|
59 | |||
@@ -276,7 +277,7 void ChartAxis::setLabelPadding(int padding) | |||||
276 |
|
277 | |||
277 | bool ChartAxis::isEmpty() |
|
278 | bool ChartAxis::isEmpty() | |
278 | { |
|
279 | { | |
279 |
return |
|
280 | return m_axisRect.isEmpty() || m_gridRect.isEmpty() || qFuzzyIsNull(m_min - m_max); | |
280 | } |
|
281 | } | |
281 |
|
282 | |||
282 | void ChartAxis::handleDomainUpdated() |
|
283 | void ChartAxis::handleDomainUpdated() | |
@@ -341,7 +342,6 void ChartAxis::setTitleText(const QString &title) | |||||
341 | { |
|
342 | { | |
342 | if (m_titleText != title) { |
|
343 | if (m_titleText != title) { | |
343 | m_titleText = title; |
|
344 | m_titleText = title; | |
344 | m_axisRect = QRect(); |
|
|||
345 | QGraphicsLayoutItem::updateGeometry(); |
|
345 | QGraphicsLayoutItem::updateGeometry(); | |
346 | presenter()->layout()->invalidate(); |
|
346 | presenter()->layout()->invalidate(); | |
347 | } |
|
347 | } |
General Comments 0
You need to be logged in to leave comments.
Login now