summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Rosa <marek.rosa@digia.com>2012-12-13 13:33:08 +0200
committerMarek Rosa <marek.rosa@digia.com>2012-12-13 13:33:08 +0200
commitbce67224e7a27562eb861057141e29d83f0ae8c1 (patch)
tree556b2482fead9e69d853e5d1cdfeae495376e55f /src
parentc871e96450b9b14ef2b60abf3f91425f3c0eb488 (diff)
Fixed: when animation enabled charts crash when setting the range which has no ticks (logvalueaxis, categoryaxis)
Diffstat (limited to 'src')
-rw-r--r--src/animations/axisanimation.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/animations/axisanimation.cpp b/src/animations/axisanimation.cpp
index c6c5fd46..dc224e18 100644
--- a/src/animations/axisanimation.cpp
+++ b/src/animations/axisanimation.cpp
@@ -57,8 +57,10 @@ void AxisAnimation::setValues(QVector<qreal> &oldLayout, QVector<qreal> &newLayo
{
if (state() != QAbstractAnimation::Stopped) stop();
- if (newLayout.count() == 0)
- return;
+// TODO: cannot return even if layout is empty
+// New layout is not set properly without it (crash)
+// if (newLayout.count() == 0)
+// return;
switch (m_type) {
case ZoomOutAnimation: {
@@ -128,7 +130,7 @@ void AxisAnimation::updateCurrentValue(const QVariant &value)
{
if (state() != QAbstractAnimation::Stopped) { //workaround
QVector<qreal> vector = qvariant_cast<QVector<qreal> >(value);
- Q_ASSERT(vector.count() != 0);
+// Q_ASSERT(vector.count() != 0);
m_axis->setLayout(vector);
m_axis->updateGeometry();
}