From c34ad1dc5b10c547bc72ec472f5f950172609130 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 27 Nov 2014 13:40:04 +0100 Subject: [PATCH] QmlProfiler: Don't modify height of timeline items based on row height When precomputing all timeline items in advance we cannot react to height changes later Change-Id: Ib038fb59581fe8367c1c550839a728f371005ab6 Reviewed-by: Kai Koehne --- .../qmlprofiler/qmlprofileranimationsmodel.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp index 8d85696e582..a7bf2f5652a 100644 --- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp @@ -174,16 +174,9 @@ QColor QmlProfilerAnimationsModel::color(int index) const float QmlProfilerAnimationsModel::relativeHeight(int index) const { - const int thread = selectionId(index); - - // Add some height to the events if we're far from the scale threshold of 2 * DefaultRowHeight. - // Like that you can see the smaller events more easily. - int scaleThreshold = 2 * defaultRowHeight() - rowHeight(rowFromThreadId(thread)); - float boost = scaleThreshold > 0 ? (0.15 * scaleThreshold / defaultRowHeight()) : 0; - - return boost + (1.0 - boost) * (float)m_data[index].animationcount / - (float)(thread == QmlDebug::GuiThread ? m_maxGuiThreadAnimations : - m_maxRenderThreadAnimations); + return (float)m_data[index].animationcount / (float)(selectionId(index) == QmlDebug::GuiThread ? + m_maxGuiThreadAnimations : + m_maxRenderThreadAnimations); } QVariantList QmlProfilerAnimationsModel::labels() const