Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ protected void layout(Composite composite, boolean flushCache) {
int width = Math.max(0, area.width - trim);

if (width > 1)
layoutTableTree(table, width, area, tableWidth < area.width);
layoutTableTree(table, width, area, tableWidth > 0 && tableWidth < area.width);
Comment on lines 256 to +257
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (width > 1)
layoutTableTree(table, width, area, tableWidth < area.width);
layoutTableTree(table, width, area, tableWidth > 0 && tableWidth < area.width);
if (width > 1 && tableWidth > 0)
layoutTableTree(table, width, area, tableWidth < area.width);

This seems more logical to me, we already check if the areas width is larger than 1 (why not zero? anyways ...) so it seems to already want to skip under this condition, having the table has no size at all seems a valid extension of such checks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming we merge this one and it will introduce regressions, would you then agree to merge eclipse-equinox/p2#947 instead?
I honestly don't have more time to spend on debugging the "Trust" preference page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can relate to not having time, so I empathize. I wold much prefer to see this cycle broken in this part of the code.

@laeubi

You made a suggestion but I don't really understand it.

Is the indentation off on the new line 256?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more logical to me,

I haven't noticed that you have proposed different change. No, your proposal will not work, layoutTableTree() call is really needed. My proposal avoids some handling inside that method.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed it in my workspace and it looks fine to me. Please proceed. (And thank you!).


// For the first time we need to relayout because Scrollbars are not
// calculate appropriately
Expand Down
Loading