##// END OF EJS Templates
Fixed: when animation enabled charts crash when setting the range which has no ticks (logvalueaxis, categoryaxis)
Marek Rosa -
r2385:bce67224e7a2
parent child
Show More
@@ -57,8 +57,10 void AxisAnimation::setValues(QVector<qreal> &oldLayout, QVector<qreal> &newLayo
57 {
57 {
58 if (state() != QAbstractAnimation::Stopped) stop();
58 if (state() != QAbstractAnimation::Stopped) stop();
59
59
60 if (newLayout.count() == 0)
60 // TODO: cannot return even if layout is empty
61 return;
61 // New layout is not set properly without it (crash)
62 // if (newLayout.count() == 0)
63 // return;
62
64
63 switch (m_type) {
65 switch (m_type) {
64 case ZoomOutAnimation: {
66 case ZoomOutAnimation: {
@@ -128,7 +130,7 void AxisAnimation::updateCurrentValue(const QVariant &value)
128 {
130 {
129 if (state() != QAbstractAnimation::Stopped) { //workaround
131 if (state() != QAbstractAnimation::Stopped) { //workaround
130 QVector<qreal> vector = qvariant_cast<QVector<qreal> >(value);
132 QVector<qreal> vector = qvariant_cast<QVector<qreal> >(value);
131 Q_ASSERT(vector.count() != 0);
133 // Q_ASSERT(vector.count() != 0);
132 m_axis->setLayout(vector);
134 m_axis->setLayout(vector);
133 m_axis->updateGeometry();
135 m_axis->updateGeometry();
134 }
136 }
General Comments 0
You need to be logged in to leave comments. Login now