summaryrefslogtreecommitdiffstats
path: root/src/barchart
diff options
context:
space:
mode:
authorMarek Rosa <marek.rosa@digia.com>2012-11-28 14:05:14 +0200
committerMarek Rosa <marek.rosa@digia.com>2012-11-28 14:05:14 +0200
commit4de64fb010d7ee98cb6797c684431d415679889c (patch)
treefcab098cd9ed2dd4af93e35281b2a0f34d1b15ff /src/barchart
parent765dbd69651cf429b0c34aea38382abca27195f5 (diff)
BarChart brush and labels fix
Diffstat (limited to 'src/barchart')
-rw-r--r--src/barchart/abstractbarchartitem.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/barchart/abstractbarchartitem.cpp b/src/barchart/abstractbarchartitem.cpp
index ffb2e494..01bbfa91 100644
--- a/src/barchart/abstractbarchartitem.cpp
+++ b/src/barchart/abstractbarchartitem.cpp
@@ -123,6 +123,7 @@ void AbstractBarChartItem::handleLayoutChanged()
return; // rect size zero.
QVector<QRectF> layout = calculateLayout();
applyLayout(layout);
+ handleUpdatedBars();
}
void AbstractBarChartItem::handleLabelsVisibleChanged(bool visible)
@@ -141,8 +142,6 @@ void AbstractBarChartItem::handleDataStructureChanged()
m_labels.clear();
m_layout.clear();
- bool labelsVisible = m_series->isLabelsVisible();
-
// Create new graphic items for bars
for (int c = 0; c < m_series->d_func()->categoryCount(); c++) {
for (int s = 0; s < m_series->count(); s++) {
@@ -158,14 +157,13 @@ void AbstractBarChartItem::handleDataStructureChanged()
m_layout.append(QRectF(0, 0, 0, 0));
// Labels
- QGraphicsSimpleTextItem *label = new QGraphicsSimpleTextItem(this);
- label->setVisible(labelsVisible);
- m_labels.append(label);
+ m_labels.append(new QGraphicsSimpleTextItem(this));
}
}
if(themeManager()) themeManager()->updateSeries(m_series);
handleLayoutChanged();
+ handleVisibleChanged();
}
void AbstractBarChartItem::handleVisibleChanged()