clifordsymack / Electron-Cash

Electrum; Bitcoin thin client
MIT License
6 stars 3 forks source link

Proposed fix to the "Qt status bug" #9

Closed cculianu closed 5 years ago

cculianu commented 5 years ago

https://github.com/clifordsymack/Electron-Cash/blob/4327900266a40667257478fabbaf078c943c4086/plugins/shuffle/qt.py#L146

I think setting the items may or may not cause a repaint and that may be why the statuses aren't properly updated (can't be sure though).

I suggest trying to add a call to QWidget's 'real' update() function at the very end and seeing if it helps.

super(MyTreeWidget, utxo_list).update()

or..

QWidget.update(utxo_list)

(If that doesn't work, a potential work-around would be nasty as hell and involve clearing all the items from the list and re-constructing the QTreeWidgetItems fresh (ouch).)

cculianu commented 5 years ago

Nevermind this won't work. I found the source of the problem here:

https://github.com/clifordsymack/Electron-Cash/blob/4327900266a40667257478fabbaf078c943c4086/gui/qt/util.py#L468

I'm going to send you a PR with a workaround for this issue.