tmf: Update the initial item height calculation in Linux
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Fri, 11 Sep 2015 18:57:24 +0000 (14:57 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Mon, 14 Sep 2015 10:29:59 +0000 (06:29 -0400)
commitff2990ed159e06483cbb324ac08cc1e8cedb063e
treea5b8284eeba800977d8a5975d5a3168975235fd3
parentc534b0a534b05eb1f4088ba64fbba6e98a716dc0
tmf: Update the initial item height calculation in Linux

In Linux the item height is calculated by the difference of the y
positions of 2 first consecutive tree items. When the 2 tree items
are available a paint listener is added to the tree and in the paint
method the height is calculated using the 2 stored items. The
paint listener is needed to make sure that the items are painted
and the y values are correct. However, between the time the items are
retrieved and the paint listener is executed the first item could have
been expanded and the y position second item is changed so that the
calculated height is much bigger. This patch fixes it by retrieving
the items in the paint listener.

Up to now this condition happens very, very rarely. However, with
patch https://git.eclipse.org/r/#/c/55749 this will happen consistently

Change-Id: I528c9baa5602cf8897ff84dc98cf71be2fb1fb91
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/55779
Reviewed-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/TimeGraphCombo.java
This page took 0.032017 seconds and 5 git commands to generate.