Ensure reflow reflows non-visible widgets, fix scroll_to_center issue #2684
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2268
Closes #2254
When
reflow
was called, we were only reflowing visible widgets. This was preventing widgets that were not visible from being added intofull_map
.reflow_visible
was explicitly passingvisible_only=True
toarrange_root
, but that was actually already the default value.reflow
was not passingvisible_only
at all, so it was defaulting toTrue
.This broke
scroll_to_center
, because widgets that were scrolled out of view were not present in the compositors full map.With this change, the
_full_map
is now fully populated byreflow
, andscroll_to_center
works as expected.I've removed the
xfail
thescroll_to_center
snapshot test and it seems to pass consistently now.Please review the following checklist.