Fix regression with initial sorting after pr205 #229

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:210227-sort changing 2 files +3 −2
  1. hebasto commented at 3:57 pm on February 27, 2021: member

    Unfortunately, #205 introduced a regression. After opening the “Receive” or “Transaction” tab at first time despite of the “Date” header is marked as sorted, table rows are not sorted actually:

    Screenshot from 2021-02-27 17-49-54

    It appears that sorting the table must be triggered after the QTableView::setModel call.

    With this PR (and pre-#205):

    Screenshot from 2021-02-27 17-48-40

  2. qt: Fix regression with initial sorting after pr205
    QTableView widget must be explicitly sorted after the setModel call.
    c524dc54bb
  3. hebasto commented at 3:58 pm on February 27, 2021: member
    Many thanks to @Geremia who reports about this regression.
  4. leonardojobim approved
  5. leonardojobim commented at 9:53 pm on February 27, 2021: none

    Tested ACK https://github.com/bitcoin-core/gui/pull/229/commits/c524dc54bb985f801b5a3def3c3d51ce497e838e on Ubuntu 20.04.2 Qt 5.12.8

    I can confirm the “Transactions” table rows are not initially ordered on the master branch. And this PR fixes this.

    However, in my node, the “Receive” table rows are correctly ordered, both on the master and on this PR branch.

    Transactions table on master branch Transactions table on this PR branch Both (“Receive” table)
  6. Talkless commented at 1:19 pm on February 28, 2021: none
    tACK c524dc54bb985f801b5a3def3c3d51ce497e838e, tested on Debian Sid with Qt 5.15.2. I can confirm @leonardojobim observations.
  7. jonatack commented at 9:23 pm on February 28, 2021: contributor
    ACK c524dc54bb985f801b5a3def3c3d51ce497e838e
  8. jarolrod commented at 1:57 am on March 1, 2021: member

    ACK c524dc54bb985f801b5a3def3c3d51ce497e838e, tested on macOS 11.1 Qt 5.15.2

    Confirming this regression on master and that this PR fixes it. I see the same behavior as shown in @leonardojobim screenshots.

    This regression can actually be seen in my review of the PR that introduced the bug: #205#pullrequestreview-585193420. It’s not immediately obvious that the PR introduced this bug because all of the transactions occurred under the same minute. The maturity indicator is the clue that shows that the transactions we’re not sorted by date under this PR.

    This highlights the need for increased test coverage of the GUI.

  9. hebasto added the label Bug on Mar 2, 2021
  10. MarcoFalke merged this on Mar 10, 2021
  11. MarcoFalke closed this on Mar 10, 2021

  12. hebasto deleted the branch on Mar 10, 2021
  13. laanwj commented at 4:31 pm on March 10, 2021: member
    Thanks for fixing this, can confirm that it works.
  14. sidhujag referenced this in commit 56d2f973d8 on Mar 10, 2021
  15. gwillen referenced this in commit dcc80b82f2 on Jun 28, 2022
  16. bitcoin-core locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-23 00:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me