dot instead comma ?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Forthman
Posts: 966
Joined: Fri Apr 27, 2018 11:23 am
Location: Tarn-et-Garonne (82)

dot instead comma ?

Postby Forthman » Fri Apr 26, 2019 11:03 am

Hi,
In techdraw and elsewhere, it is mandatory to use the decimal comma rather than the dot.
And it's not practical at all to enter a value :(
Is it possible to use the dot for all entry ?

---------------------------------
OS: Linux Mint 19.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
User avatar
meme2704
Posts: 2926
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: dot instead comma ?

Postby meme2704 » Fri Apr 26, 2019 11:28 am

Salut
I do not meet this concern, I can write 10.2 with the numeric numeriqpad or 10,2 by combining the 2

On the other hand I discover not being able to size the angle of 118 ° nor compared the horizontal nor vertical
Attachments
cotation.PNG
cotation.PNG (10.28 KiB) Viewed 1106 times
User avatar
Roy_043
Posts: 1383
Joined: Thu Dec 27, 2018 12:28 pm

Re: dot instead comma ?

Postby Roy_043 » Fri Apr 26, 2019 11:36 am

AFAIK this depends on your locale (and of course your numpad layout).
Most users in the Netherlands face the same problem: Locale says 'decimal comma', but numpad has a decimal point key.
I would love to see this as a user setting.
Or see the behavior that spreadsheet programs have here: numpad point or comma results in the correct decimal separator for the current locale.

I am using a small AHK script (Windows only) as a workaround (Note: first 3 lines are not required):

Code: Select all

RegRead, regStr, HKEY_CLASSES_ROOT\.FCStd
RegRead, regStr, HKEY_CLASSES_ROOT\%regStr%\shell\open\command
Menu, Tray, Icon, % StrSplit(regStr, """")[2] ; Array is one-based.
#SingleInstance,Force
#IfWinActive FreeCAD
NumpadDot::,
openBrain
Posts: 4173
Joined: Fri Nov 09, 2018 5:38 pm

Re: dot instead comma ?

Postby openBrain » Fri Apr 26, 2019 11:40 am

Same as meme2704 here (with FR locale too, as for Forthman as well). I can use the dot from the numpad.
As far as I browse the code, FC uses locale separators (and it works well).
Maybe first check the regional config of your system. ;)
User avatar
meme2704
Posts: 2926
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: dot instead comma ?

Postby meme2704 » Fri Apr 26, 2019 11:43 am

Yes, exactly in France too (and the rest of Europe except England)
This is a setting to make in the Windows config (for those who use Windows)
User avatar
Roy_043
Posts: 1383
Joined: Thu Dec 27, 2018 12:28 pm

Re: dot instead comma ?

Postby Roy_043 » Fri Apr 26, 2019 11:52 am

So are you saying that using the numpad dot results in '.' while editing a text file, but while changing a value in FreeCAD the result is ',' ?

FYI: my keyboard layout is US.
User avatar
Forthman
Posts: 966
Joined: Fri Apr 27, 2018 11:23 am
Location: Tarn-et-Garonne (82)

Re: dot instead comma ?

Postby Forthman » Fri Apr 26, 2019 12:12 pm

In sketcher i can enter a value with a dot and it will be replaced by a comma : ok
In "base property" of Techdraw, the dot key is ignored

would it be possible for Techdraw to accept the dot and transform it into a comma? :?:
User avatar
wandererfan
Posts: 3968
Joined: Tue Nov 06, 2012 5:42 pm

Re: dot instead comma ?

Postby wandererfan » Sat Apr 27, 2019 2:24 pm

Forthman wrote:
Fri Apr 26, 2019 12:12 pm
would it be possible for Techdraw to accept the dot and transform it into a comma? :?:
Not really possible to do this inside TechDraw. Needs a change in the PropertyEditor for PropertyFloat.

The same thing happens if your locale wants "." as decimal separator and you type ",". The "," just gets ignored.

I'm not sure how the editor would know which "." were decimal separators and which were thousands separator.

I would make a FeatureRequest to have the PropertyEditor interpret keypad "." as locale's decimal separator.
openBrain
Posts: 4173
Joined: Fri Nov 09, 2018 5:38 pm

Re: dot instead comma ?

Postby openBrain » Sat Apr 27, 2019 3:16 pm

Should not be so complicated by using the Qt functions to use the locale settings.
Is Techdraw coded with direct Qt or Python ?
User avatar
wandererfan
Posts: 3968
Joined: Tue Nov 06, 2012 5:42 pm

Re: dot instead comma ?

Postby wandererfan » Sat Apr 27, 2019 3:35 pm

openBrain wrote:
Sat Apr 27, 2019 3:16 pm
Should not be so complicated by using the Qt functions to use the locale settings.
Is Techdraw coded with direct Qt or Python ?
TD is in C++/Qt. But that isn't the issue. The PropertyEditor is part of core /Gui module functionality which clearly knows about locale, but maybe not about keypad decimal points.