tmf: Fix TimeGraphCombo item height synchronization issues
authorPatrick Tasse <patrick.tasse@gmail.com>
Fri, 11 Sep 2015 22:33:12 +0000 (18:33 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Tue, 15 Sep 2015 18:42:14 +0000 (14:42 -0400)
commit63b93cd6b908011b86b356e1680edd0d7b1cd025
treecddbf05dac2e43469e1388bdae235b57b8c00ed1
parente5b213336de87033f19c09d10229fc5a385a8a43
tmf: Fix TimeGraphCombo item height synchronization issues

- Remove the caching of item height data in the tree item widget that is
meant to prevent repeatedly setting the time graph item height.

This only saved a hash map lookup in the time graph, but required two
linear searches in the TreeItem widget keyed data. It also could prevent
the height alignment to be performed if the time graph changed its item
heights without the time graph combo knowing about it. For example, all
time graph item heights are reset on refresh.

- Set the input on the time graph before setting the global item height.

Getting the global item height involves refreshing the list of visible
expanded elements, which also synchronizes their expanded state. If the
time graph input is not set yet, this causes all tree items to be
unnecessary (but temporarily) collapsed. As as counterpart to changing
the order, setting the global item height on the time graph will update
the item height of every existing time graph item. This only happens
once (when the input is set).

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