summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/bars3drenderer.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-05-30 14:37:43 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-06-02 08:11:46 +0300
commit5170c3fb57210a89978501108e07c598fb083fbc (patch)
treeaec503e77412c25789cde8e187eb0c415d9ef1e2 /src/datavisualization/engine/bars3drenderer.cpp
parentaac8c10200d1cc9354c0f5190adb858021f77e6b (diff)
Fix various issues
Change-Id: I4a6d4775f3ca578370a9ce23491bddcb0f5486ec Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/engine/bars3drenderer.cpp')
-rw-r--r--src/datavisualization/engine/bars3drenderer.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/datavisualization/engine/bars3drenderer.cpp b/src/datavisualization/engine/bars3drenderer.cpp
index 73a2eb3a..afa249c7 100644
--- a/src/datavisualization/engine/bars3drenderer.cpp
+++ b/src/datavisualization/engine/bars3drenderer.cpp
@@ -298,8 +298,11 @@ void Bars3DRenderer::updateSeries(const QList<QAbstract3DSeries *> &seriesList)
m_haveGradientSeries = true;
}
}
- if (noSelection && !selectionLabel().isEmpty())
- m_selectionLabelDirty = true;
+ if (noSelection) {
+ if (!selectionLabel().isEmpty())
+ m_selectionLabelDirty = true;
+ m_selectedSeriesCache = 0;
+ }
}
SeriesRenderCache *Bars3DRenderer::createNewCache(QAbstract3DSeries *series)
@@ -2058,12 +2061,13 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer
}
QQuaternion totalRotation = Utils::calculateRotation(labelRotation);
+ labelCount = qMin(m_axisCacheZ.labelCount(), m_cachedColumnCount);
if (m_zFlipped) {
startIndex = 0;
- endIndex = m_cachedRowCount;
+ endIndex = labelCount;
indexStep = 1;
} else {
- startIndex = m_cachedRowCount - 1;
+ startIndex = labelCount - 1;
endIndex = -1;
indexStep = -1;
}
@@ -2175,14 +2179,14 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer
}
totalRotation = Utils::calculateRotation(labelRotation);
-
+ labelCount = qMin(m_axisCacheX.labelCount(), m_cachedColumnCount);
if (m_xFlipped) {
- startIndex = m_cachedColumnCount - 1;
+ startIndex = labelCount - 1;
endIndex = -1;
indexStep = -1;
} else {
startIndex = 0;
- endIndex = m_cachedColumnCount;
+ endIndex = labelCount;
indexStep = 1;
}
for (int column = startIndex; column != endIndex; column = column + indexStep) {