Open hansu opened 2 months ago
I can confirm this behavior. Any G-code file can be used for recall, not just an empty G-code file.
In place for tool information is used as a decimal point and a dot. It is also in the Czech localization.
It looks wierd.
Possible workarounds are:
Click on reload tool table before adding a tool
Use reload tool on start in the settings:
The problem does not appear on Debian Bullseye / Python 3.9.2
I was able to encircle the error. The problem is that the locale setting gets destroyed when showing the main box.
Good to see with these debug prints: https://github.com/hansu/linuxcnc/commit/0fe0482b10a29801de4deacfb1f438e90dd1139e
Output:
--- INIT:352, locale: ('de_DE', 'UTF-8')
--- INIT:356, locale: (None, None)
If I set the locale again after this with
locale.setlocale(locale.LC_ALL, '')
all works fine.
But this does't sound like a clean solution.
@c-morley any idea on this?
When using locale settings for e.g. Germany, so having a "," as decimal point, the tool table shows the correct decimal point after starting. But after loading an (empty) G-code file and reloading the tool table, the decimal point changes to a dot:
https://github.com/LinuxCNC/linuxcnc/assets/67957916/421d6f9a-7a8d-4f6c-90cb-40ac777b398f
This can lead to loss of the complete tool table in the following (quite common) case:
https://github.com/LinuxCNC/linuxcnc/assets/67957916/a59e732b-f6b2-4aa1-a6b7-9ae81574fa16
Version: latest from 2.9 branch.