gui icon indicating copy to clipboard operation
gui copied to clipboard

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

Open luke-jr opened this issue 4 years ago • 8 comments

~~Regression introduced in #205~~

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

luke-jr avatar Jun 24 '21 02:06 luke-jr

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?

hebasto avatar Jun 29 '21 04:06 hebasto

@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?

hebasto avatar Aug 08 '21 09:08 hebasto

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.

luke-jr avatar Sep 08 '21 01:09 luke-jr

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 avatar Sep 09 '21 15:09 hebasto

This discussion has been inactive for a long time.

Should it be closed?

hebasto avatar Jun 01 '22 22:06 hebasto

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.

RandyMcMillan avatar Jun 02 '22 13:06 RandyMcMillan

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.

DrahtBot avatar Jun 12 '22 21:06 DrahtBot

@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?

hebasto avatar Jul 21 '22 15:07 hebasto