Report a missing layout in the layout spy output - #2422
Open
vogella wants to merge 1 commit into
Open
Conversation
The layout section of the widget details and of the copied widget tree stayed empty for composites without a layout, which reads like a defect in the spy rather than like information about the widget. Print getLayout() == null instead, mirroring the getLayoutData() == null line right above it, and leave the section out entirely for leaf controls, where it only repeated that the control is not a composite. Also fix the truncation check for grid layouts, which intersected the parent bounds with themselves instead of with the child bounds. The intersection was therefore always equal to the child rectangle and the warnings about missing grab flags could never appear.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The layout section of the layout spy stayed empty for composites that have no layout, both in the details panel and in the copied widget tree. That looks like a broken spy rather than like a statement about the widget, so it now prints
getLayout() == null, mirroring thegetLayoutData() == nullline right above it. For leaf controls the section is dropped completely instead of repeating "not a Composite" for every label and button in a tree dump.While in there: the truncation check for grid layouts intersected the parent bounds with themselves instead of with the child bounds, so the intersection always matched and the warnings about missing grab flags could never be shown.