From 5170c3fb57210a89978501108e07c598fb083fbc Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 30 May 2014 14:37:43 +0300 Subject: Fix various issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4a6d4775f3ca578370a9ce23491bddcb0f5486ec Reviewed-by: Tomi Korpipää --- src/datavisualization/engine/bars3drenderer.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/datavisualization/engine/bars3drenderer.cpp') 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 &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) { -- cgit v1.2.3