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: When restoring table columns, still set their minimum column width and stretch on last section #368

Conversation

luke-jr
Copy link
Member

@luke-jr luke-jr commented Jun 24, 2021

Regression introduced in #205

Correction: Undefined behaviour currently makes this a non-issue, but probably better to be safe and do it correctly.

@hebasto hebasto added Bug Something isn't working UI All about "look and feel" labels Jun 24, 2021
@hebasto hebasto changed the title Bugfix: GUI: When restoring table columns, still set their minimum column width and stretch on last section Bugfix: When restoring table columns, still set their minimum column width and stretch on last section Jun 24, 2021
@bitcoin-core bitcoin-core deleted a comment Jun 24, 2021
@hebasto
Copy link
Member

hebasto commented Jun 29, 2021

When restoring table columns, still set their minimum column width and stretch on last section

Are minimumSectionSize and stretchLastSection parts of the saved state?

Regression introduced in #205

How is it observable by a user?

Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

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

Are minimumSectionSize and stretchLastSection parts of the saved state?

yes, they both are. See: https://code.qt.io/cgit/qt/qt.git/tree/src/gui/itemviews/qheaderview.cpp#n3556

Regression introduced in #205

While I think this change is ok, is it possible for a user to actually manipulate the header view in a way where they can run into an issue here?

@hebasto
Copy link
Member

hebasto commented Aug 8, 2021

@luke-jr

The minimumSectionSize and stretchLastSection properties of the QHeaderView class are saved with QHeaderView::saveState and restored with QHeaderView::restoreState.

Regression introduced in #205

  1. From the PR description it is not clear what is actually a bug in the current master branch. Could you elaborate please?

  2. What is the reason to set minimumSectionSize and stretchLastSection before restoring the header state, when during this restoring (if it succeeds, of course) the values of these properties will be overwritten?

@luke-jr
Copy link
Member Author

luke-jr commented Sep 8, 2021

I guess this is more about not relying on undefined behaviour rather than a bugfix.

Leaving the assignment prior to restoring sizes, so that users who actually go to the trouble to hack their setting are respected.

@hebasto
Copy link
Member

hebasto commented Sep 9, 2021

I guess this is more about not relying on undefined behaviour rather than a bugfix.

Leaving the assignment prior to restoring sizes, so that users who actually go to the trouble to hack their setting are respected.

Why only are setMinimumSectionSize and setStretchLastSection considered? And not setColumnWidth methods?

And -resetguisettings could always help :)

@hebasto
Copy link
Member

hebasto commented Jun 1, 2022

This discussion has been inactive for a long time.

Should it be closed?

@RandyMcMillan
Copy link
Contributor

Let's leave this open - In previous work I added a "bumper" column to the tableview - this helped address some of the issues. The bumper column was an addon to other PRs but not a stand alone PR - I will put together a PR that focuses on why this is useful.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 12, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #684 (Improve 'Requested Payments History' Multiselect by john-moffett)
  • #662 (Fix transaction view/table by luke-jr)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@hebasto
Copy link
Member

hebasto commented Jul 21, 2022

@luke-jr

This discussion has been inactive for a long time.

Should it be closed?

Instead of reacting with the "thumbs down" emoji, maybe just answer questions from the comments?

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 5, 2024

🤔 There hasn't been much activity lately and the CI seems to be failing.

If no one reviewed the current pull request by commit hash, a rebase can be considered. While the CI failure may be a false positive, the CI hasn't been running for some time, so there may be a real issue hiding as well. A rebase triggers the latest CI and makes sure that no silent merge conflicts have snuck in.

@hebasto
Copy link
Member

hebasto commented Feb 7, 2024

Closing due to lack of activity.

@hebasto hebasto closed this Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working CI failed UI All about "look and feel"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants