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!
Post Reply
User avatar
Forthman
Veteran
Posts: 2650
Joined: Fri Apr 27, 2018 11:23 am
Location: Tarn-et-Garonne (82)

dot instead comma ?

Post by Forthman »

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
Veteran
Posts: 2926
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: dot instead comma ?

Post by meme2704 »

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 5665 times
User avatar
Roy_043
Veteran
Posts: 8457
Joined: Thu Dec 27, 2018 12:28 pm

Re: dot instead comma ?

Post by Roy_043 »

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
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: dot instead comma ?

Post by openBrain »

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
Veteran
Posts: 2926
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: dot instead comma ?

Post by meme2704 »

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
Veteran
Posts: 8457
Joined: Thu Dec 27, 2018 12:28 pm

Re: dot instead comma ?

Post by Roy_043 »

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
Veteran
Posts: 2650
Joined: Fri Apr 27, 2018 11:23 am
Location: Tarn-et-Garonne (82)

Re: dot instead comma ?

Post by Forthman »

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
Veteran
Posts: 6270
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: dot instead comma ?

Post by wandererfan »

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
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: dot instead comma ?

Post by openBrain »

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
Veteran
Posts: 6270
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: dot instead comma ?

Post by wandererfan »

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.
Post Reply