rgriebl / brickstore

An offline BrickLink inventory management tool.
https://www.brickstore.dev/
GNU General Public License v3.0
110 stars 27 forks source link

Adjust price option does not work on some devices #811

Closed Createat8 closed 5 months ago

Createat8 commented 5 months ago

Describe the bug The "adjust price" option does not work for me anymore on my main laptop. Adjust the price for multiple items, or for one item, with percentage or EUR, nothing seems to be working.

To Reproduce Steps to reproduce the behavior:

  1. open a new file and add a bunch of parts (or part out a set)
  2. set prices of all parts to priceguide
  3. right click on the price and select "adjust price" to get the popup
  4. enter "-30%" and click OK
  5. the popup disappears, but the prices remain the same
  6. alternatively on step 4 do not click OK but press the enter button instead
  7. the popup does not dissappear, the OK button is set to inactive and nothing happens to the prices (see screenshot)

Expected behavior All prices are adjusted according to the input

Screenshots image

System information

BrickStore 2024.1.2 (build: 1143)

Additional context I've tested this on another laptop as well, but there it works fine. The specs of that laptop are:

BrickStore 2024.1.2 (build: 1143)

rgriebl commented 5 months ago

The only difference in the sysinfos I see is Win 10 vs Win 11, but it works on both over here. There's one weird thing though: your locale says nl, but the screenshot shows that BrickStore uses a decimal point instead of a decimal comma (Wikipedia says the Netherlands are using a comma). The symptoms you are seeing can be explained by 30.00 not being a floating pointer number but the integer 3000 with a misplaced group separator. Can you check on your "good" laptop, if BrickStore is using a decimal comma there?

Createat8 commented 5 months ago

Yeah you are right, on the laptop that's working it uses the decimal comma. On this one it's a decimal point, for all prices as well. I can't remember if it was a comma on this laptop as well to be honest. But I guess it's supposed to use the computer's locale setting?

Createat8 commented 5 months ago

I've installed the latest version again, but to no effect.

However, I do see that the price adjustments work, but only if I use the little arrow keys, and only if the percentage is below 1 percent

this works, using the arrows to go to -0.99%: image

but this does not work, using the arrow key to get to -1.00% and consequently the "OK" button is set to inactive image

It's almost as if the application interprets the 1.00% as 100%?

rgriebl commented 5 months ago

It's almost as if the application interprets the 1.00% as 100%?

That's what I wrote above. I can reproduce your issue on my wife's W11 machine: it's set to German (decimal comma), but if I change that to a decimal point in Window regional settings (the Advanced page), then BOTH the 1000's group separator AND the decimal separator are a point. I have no idea why Windows would allow me to set it up like this, but this ambiguity royally screws ANY number parser, not just BrickStore's.

TL;DR: Reset your Advanced Windows regional settings to default.

Createat8 commented 5 months ago

Yeah, that did the trick. I've set the regional setting to "Netherlands" as it was already set to "default". That brought back the comma. I changed it back to "default" and it's still comma. so that's good. No idea why windows decided to use the point!

Thanks for the help! Good to see it's not a bug in the application :-)