Commit 8c80a862 authored by Ulf Hermann's avatar Ulf Hermann

Timeline: Fix event compression for non-default heights

The "id" member of OpaqueColoredPoint2DWithSize is then used as the
number of events compressed into one. To discern it from an actual
id it's also negated. Thus, it needs to be updated when adding an
event. This is not a problem for default height items because their
top is always at 0, so that the addition of the 'y' members doesn't
have an effect.

Change-Id: Ibd7218954e36661d7f729465430de89821a41a7f
Task-number: QTCREATORBUG-16763
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann's avatarUlf Hermann <ulf.hermann@qt.io>
parent f4b8ec1e
......@@ -143,8 +143,12 @@ float OpaqueColoredPoint2DWithSize::top() const
void OpaqueColoredPoint2DWithSize::update(float nr, float ny)
{
if (a <= MaximumDirection)
if (a <= MaximumDirection) {
a += MaximumDirection;
id = -2;
} else {
--id;
}
y += ny;
w = nr - x;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment