@@ -123,6 +123,7 void AbstractBarChartItem::handleLayoutChanged() | |||
|
123 | 123 | return; // rect size zero. |
|
124 | 124 | QVector<QRectF> layout = calculateLayout(); |
|
125 | 125 | applyLayout(layout); |
|
126 | handleUpdatedBars(); | |
|
126 | 127 | } |
|
127 | 128 | |
|
128 | 129 | void AbstractBarChartItem::handleLabelsVisibleChanged(bool visible) |
@@ -141,8 +142,6 void AbstractBarChartItem::handleDataStructureChanged() | |||
|
141 | 142 | m_labels.clear(); |
|
142 | 143 | m_layout.clear(); |
|
143 | 144 | |
|
144 | bool labelsVisible = m_series->isLabelsVisible(); | |
|
145 | ||
|
146 | 145 | // Create new graphic items for bars |
|
147 | 146 | for (int c = 0; c < m_series->d_func()->categoryCount(); c++) { |
|
148 | 147 | for (int s = 0; s < m_series->count(); s++) { |
@@ -158,14 +157,13 void AbstractBarChartItem::handleDataStructureChanged() | |||
|
158 | 157 | m_layout.append(QRectF(0, 0, 0, 0)); |
|
159 | 158 | |
|
160 | 159 | // Labels |
|
161 |
|
|
|
162 | label->setVisible(labelsVisible); | |
|
163 | m_labels.append(label); | |
|
160 | m_labels.append(new QGraphicsSimpleTextItem(this)); | |
|
164 | 161 | } |
|
165 | 162 | } |
|
166 | 163 | |
|
167 | 164 | if(themeManager()) themeManager()->updateSeries(m_series); |
|
168 | 165 | handleLayoutChanged(); |
|
166 | handleVisibleChanged(); | |
|
169 | 167 | } |
|
170 | 168 | |
|
171 | 169 | void AbstractBarChartItem::handleVisibleChanged() |
General Comments 0
You need to be logged in to leave comments.
Login now