##// 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 58 if (state() != QAbstractAnimation::Stopped) stop();
59 59
60 if (newLayout.count() == 0)
61 return;
60 // TODO: cannot return even if layout is empty
61 // New layout is not set properly without it (crash)
62 // if (newLayout.count() == 0)
63 // return;
62 64
63 65 switch (m_type) {
64 66 case ZoomOutAnimation: {
@@ -128,7 +130,7 void AxisAnimation::updateCurrentValue(const QVariant &value)
128 130 {
129 131 if (state() != QAbstractAnimation::Stopped) { //workaround
130 132 QVector<qreal> vector = qvariant_cast<QVector<qreal> >(value);
131 Q_ASSERT(vector.count() != 0);
133 // Q_ASSERT(vector.count() != 0);
132 134 m_axis->setLayout(vector);
133 135 m_axis->updateGeometry();
134 136 }
General Comments 0
You need to be logged in to leave comments. Login now