Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Wrong column width with reused widget in last column #59816

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

mlange-42
Copy link
Contributor

Summary

Bugfixes "Wrong column width with reused widget as last one"

Purpose of change

Column widths could be wrong with minimum_columns when a widget was used mutliple times in a layout, and one of the uses was the last column.

Describe the solution

Layouts with minimum_columns remaining space to the last column.

Comparison was against the Id of the last widgets, which caused problems for widgets used multiple times. Changed to iterate by index, and to use the index to check if it is the last widget.

Describe alternatives you've considered

None

Testing

Had a sidebar layout that was broken by the bug. It is fixed now.

Additional context

None

comparison was against the id of the last widgets, which caused problems
for widgets used multiple times.

changed to iterate by index, and to use the index for the check.
@mlange-42 mlange-42 requested a review from dseguin as a code owner August 1, 2022 21:08
@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` labels Aug 1, 2022
@mlange-42 mlange-42 changed the title Bugfix: Wrong column width with reused widget as last one Bugfix: Wrong column width with reused widget in last column Aug 1, 2022
@mlange-42 mlange-42 mentioned this pull request Aug 1, 2022
27 tasks
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Aug 1, 2022
src/widget.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Aug 1, 2022
@dseguin dseguin merged commit 45421ea into CleverRaven:master Aug 1, 2022
@mlange-42 mlange-42 deleted the fix-column-width branch August 1, 2022 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants