##// END OF EJS Templates
Fix: Redraw chart when tick count changes
Marek Rosa -
r2103:394f63738c11
parent child
Show More
@@ -126,7 +126,10 void ChartValueAxisX::handleAxisUpdated()
126 {
126 {
127 //TODO:: fix this
127 //TODO:: fix this
128 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
128 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
129 m_tickCount = axis->tickCount();
129 if (m_tickCount != axis->tickCount()) {
130 m_tickCount = axis->tickCount();
131 presenter()->layout()->invalidate();
132 }
130 ChartAxis::handleAxisUpdated();
133 ChartAxis::handleAxisUpdated();
131 }
134 }
132
135
@@ -142,7 +142,10 void ChartValueAxisY::handleAxisUpdated()
142 {
142 {
143 //TODO:: fix this
143 //TODO:: fix this
144 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
144 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
145 m_tickCount = axis->tickCount();
145 if (m_tickCount != axis->tickCount()) {
146 m_tickCount = axis->tickCount();
147 presenter()->layout()->invalidate();
148 }
146 ChartAxis::handleAxisUpdated();
149 ChartAxis::handleAxisUpdated();
147 }
150 }
148
151
@@ -87,6 +87,7 Row {
87 }
87 }
88 Button {
88 Button {
89 text: "axis tick count -"
89 text: "axis tick count -"
90
90 onClicked: axis.tickCount--;
91 onClicked: axis.tickCount--;
91 }
92 }
92 Button {
93 Button {
General Comments 0
You need to be logged in to leave comments. Login now