electrum icon indicating copy to clipboard operation
electrum copied to clipboard

Numeric UpDownBox gets stuck at 5 when I manually click it

Open RealBTC opened this issue 10 years ago • 3 comments

In Preferences when you switch the Base Unit from mBTC->BTC. Then I set the decimal points by pushing small arrow buttons at the right side of that textbox (numericupdownbox). I always set it to 8 decimals, so I start pushing the up arrow button with the mouse, and when it gets to 5 , the button gets disabled. I have to close the Preference window and open it again to set it from 5 to 8 by pushing 3 more times the arrow. After the Preference window is reopened the button is enabled again.

So it looks like after 5 clicks the button is disabled, and then you have to reopen preferences to push 3 more times.

RealBTC avatar May 14 '16 07:05 RealBTC

Revisiting the issue today, I`ve discovered more weird things. Now I had basically the 8 decimal BTC format, as I also suspect this issue is closely related to #1796 ; so I have as the default BTC format with 8 decimals.

Then I switch back to mBTC, I leave the 8 decimals, close the preference window, reopen it, it set's it to 5, which is logical because mBTC is 3 digits + 5 additional is the 8 digit bitcoin has, however the balance is still showing 8 digits, so it's bugged:

Screenshot

So we have 8 digits mBTC display but in actual we only had 5 set in the options.

Now we switch back to BTC, and the numericupdown box is still disabled and stuck at 5, so we cant modify it.

We have to close the preference menu again, and reopen it. Now we can edit the 5 back to 8 for the BTC format.

But we have another bug, now if we edit the numeric updownbox, from 5-8 or put it any value, the balance digits doesnt respond to it.

We have to close electrum and reopen it for all the effects to take place


So the issues I`ve observed are: All changes are obviously done in the config file when we modify the preferences. "num_zeros": 8, and "decimal_point": 5,

-So I think first of all the mBTC->BTC issue (decimal_point) is caused because the config file is edited only after the preferences menu is closed. Instead it should be edited when the values change to be more dynamic and smooth.

-Secondly, when the digit number is edited (num_zeros), that only modifies the config file after electrum is restarted, similarly, this should modify the config file when the values are changed.

So this is just a simple file read/write error as electrum reads and writes to the config file in wrong order that gives rise to this bug.

I also think #1796 only happens when you first install electrum and never happens again. But this bug is persistent.

It should be easy to fix, good luck devs!

RealBTC avatar Jun 16 '16 06:06 RealBTC

Although the issue #1796 is no longer present in 2.7.12, this issue is still here.

More so now those buttons get stuck even more times. Sometimes it gets stuck at the "bits", and sometimes the button is grayed out, but you can still click on it.

RealBTC avatar Dec 08 '16 18:12 RealBTC

This issue still exists (checked with the latest version 2.8.1).

I believe the problem is because https://github.com/spesmilo/electrum/blob/master/gui/qt/main_window.py#L2497-L2508 doesn't update maximum number of zeros as in nz.setMaximum(self.decimal_point)

Coding-Enthusiast avatar Mar 18 '17 09:03 Coding-Enthusiast