Blender Git Loki

Git Commits -> Revision a63ac42

Revision a63ac42 by Jacques Lucke (master)
May 29, 2019, 14:02 (GMT)
Outliner: Correct outliner width computation

Before it was not possible to see everything in the outliner
when there are e.g. long icon rows. This is because Blender
did not allow panning the view to the right, since it did not
know the actual width.

Most of the code to compute the width correctly was there already,
but there were a couple of issues that made it not work.

* The tree width was computed before the tree was drawn.
This does not work, since the width is only known, after
it is drawn.
* Every `TreeElement` stores its right-most position in `xend`.
However, in the current code, the `xend` of e.g. an object is
the position where the text ends. The `xend` of the icons
is stored in the sub-tree-elements. Therefore, to compute
the maximum width, you may not skip the closed tree elements.
* The current drawing code had an early exit when the icon row
would not be visible anymore. This also skipped the calculation
of `xend`. So it would work correctly, when the icon was visible
a little bit, but not when it was not visible at all.

This patch fixes these issues. So even in more complex files, the
width is computed correcly. At least I haven't found a case, where
it does not.

Unfortunately, some optimizations had to be turned off, to make
it correct.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4887

Commit Details:

Full Hash: a63ac425d07533e602d285df4e1a13e8ec64c4cf
Parent Commit: 2069b3b
Lines Changed: +58, -91

1 Modified Path:

/source/blender/editors/space_outliner/outliner_draw.c (+58, -91) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021