Skip to content

Qt: Refresh view on wallet options widget shown #fixes 1838#2239

Closed
dnchk wants to merge 2 commits into
PIVX-Project:masterfrom
COXIT-CO:issue_1838
Closed

Qt: Refresh view on wallet options widget shown #fixes 1838#2239
dnchk wants to merge 2 commits into
PIVX-Project:masterfrom
COXIT-CO:issue_1838

Conversation

@dnchk
Copy link
Copy Markdown

@dnchk dnchk commented Mar 10, 2021

Refresh view when wallet options widget is shown, so that changes applied in debug console are visible in the widget.
1
2

dnchk added 2 commits March 9, 2021 01:45
Refresh view when wallet options widget is shown, so that changes
applied in debug console are visible in the widget.
@furszy
Copy link
Copy Markdown

furszy commented Mar 12, 2021

Hello, thanks for the contributions, adding some missing context to this and a possible solution.

The issue is the split threshold set from the RPC command that is not notifying the options model to update the split threshold data specific row (without it, there is no view update triggered for the widget/view connected to it). The wallet option widget doesn't need to poll for the data at every show (nor refresh the entire options data set which triggers the view update for every other option data listener as well).

As the RPC commands don't have access to the options model, a good solution to this would be:
(1) create a new stakeSplitChanged signal in the wallet.
(2) subscribe to the signal inside the options model.
(3) broadcast the signal from the RPC setstakesplitthreshold command (encapsulated inside a wallet method).
(4) update the specific row from the options model signal handler (using Q_EMIT dataChanged(index, index) where the index row number is OptionsID::StakeSplitThreshold and column is probably 0)

@random-zebra
Copy link
Copy Markdown

Fixed within #2293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] GUI isn't updating changes using the setstakesplitthreshold console command

3 participants