qgis 3.2 attribute table thousand separator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

qgis 3.2 attribute table thousand separator

Michael Schulz-6
Hi,

short question: in the attribute table of a database (pg) query layer, that has an integer field, the values are displayed with a thousand separator (1.003 instead of 1003). Is this new in QGIS 3.2? It's kind of annoying, because if you copy the value, the separator is copied as well, so you cannot paste it and use it directly in another query...

Thanks, Michael
--
-----------------------------------------------------------
Michael Schulz


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Alessandro Pasotti-2


On Fri, Jun 29, 2018 at 10:48 AM, Michael Schulz <[hidden email]> wrote:
Hi,

short question: in the attribute table of a database (pg) query layer, that has an integer field, the values are displayed with a thousand separator (1.003 instead of 1003). Is this new in QGIS 3.2? It's kind of annoying, because if you copy the value, the separator is copied as well, so you cannot paste it and use it directly in another query...


Yes: this is new in 3.2 and was aimed to reduce inconsistencies in number representation though all QGIS application.

QGIS now respects user's locale taken from the operating system settings, you can choose a different thousand separator or omit it completely by modifying the settings in your operating system (QGIS restart is required).

Eventually, we could implement these settings as overrides at the application level for a more fine grained control.

Cheers

--
Alessandro Pasotti
w3:   www.itopen.it

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Andreas Wicht
> QGIS now respects user's locale taken from the operating system settings, you can choose a different thousand separator or omit it completely by modifying the settings in your operating system (QGIS restart is required).
>
> Eventually, we could implement these settings as overrides at the application level for a more fine grained control.

Would it be possible to implement this only to influence the
representation of the number? This is how I see other software
products have solved this issue. Separators being copied is probably
very rarely desired by the user.

greetings
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Tobias Wendorff
Am Fr, 29.06.2018, 11:28 schrieb Andreas Wicht:
>> QGIS now respects user's locale taken from the operating system
>> settings, you can choose a different thousand separator or omit it
>> completely by modifying the settings in your operating system (QGIS
>> restart is required).
>>
>> Eventually, we could implement these settings as overrides at the
>> application level for a more fine grained control.

Sorry for hijacking this thread. Where can I find the setting?


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Alessandro Pasotti-2
In reply to this post by Andreas Wicht
On Fri, Jun 29, 2018 at 11:28 AM, Andreas Wicht <[hidden email]> wrote:
> QGIS now respects user's locale taken from the operating system settings, you can choose a different thousand separator or omit it completely by modifying the settings in your operating system (QGIS restart is required).
>
> Eventually, we could implement these settings as overrides at the application level for a more fine grained control.

Would it be possible to implement this only to influence the
representation of the number?
This is how I see other software
products have solved this issue. Separators being copied is probably
very rarely desired by the user.


I don't have statistics about the copy operations in the attribute table so I cannot confirm or deny, sorry. 

I guess that in some cases you might want to copy the localized format to paste it in something used for presentation purposes.

I'd suggest you to open a feature request where we can discuss this issue: it might be possible to implement it in a copy routine when selecting the cells in the attribute table.

But again, I'm not 100% sure this is always the desired behavior.

Please note that we have two different localized elements (for floating numbers) here:
- decimal separator (floating numbers only)
- thousand separator


--
Alessandro Pasotti
w3:   www.itopen.it

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Alessandro Pasotti-2
In reply to this post by Tobias Wendorff
On Fri, Jun 29, 2018 at 11:37 AM, Tobias Wendorff <[hidden email]> wrote:
Am Fr, 29.06.2018, 11:28 schrieb Andreas Wicht:
>> QGIS now respects user's locale taken from the operating system
>> settings, you can choose a different thousand separator or omit it
>> completely by modifying the settings in your operating system (QGIS
>> restart is required).
>>
>> Eventually, we could implement these settings as overrides at the
>> application level for a more fine grained control.

Sorry for hijacking this thread. Where can I find the setting?




It's operating system and window manager dependent.

Usually under "language/country" settings.


--
Alessandro Pasotti
w3:   www.itopen.it

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Tobias Wendorff
Am Fr, 29.06.2018, 11:53 schrieb Alessandro Pasotti:
>
> It's operating system and window manager dependent.
>
> Usually under "language/country" settings.

Oh okay. I thought, QGIS would have its own settings. The new settings
are damn annoying... My FIDs look like 1.000.400 :(

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Alessandro Pasotti-2

On Fri, Jun 29, 2018 at 12:10 PM, Tobias Wendorff <[hidden email]> wrote:
Am Fr, 29.06.2018, 11:53 schrieb Alessandro Pasotti:
>
> It's operating system and window manager dependent.
>
> Usually under "language/country" settings.

Oh okay. I thought, QGIS would have its own settings.


No: not yet, for now you need to change your operating system settings but nothing prevents us to implement this as an override in the QGIS options locale section.

 
The new settings
are damn annoying... My FIDs look like 1.000.400 :(


This is how numbers are supposed to look in your (german?) locale.


--
Alessandro Pasotti
w3:   www.itopen.it

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Tobias Wendorff
Am Fr, 29.06.2018, 12:20 schrieb Alessandro Pasotti:
> No: not yet, for now you need to change your operating system
> settings but nothing prevents us to implement this as an override
> in the QGIS options locale section.

I've give an +1.0000E+12 on this :D

>> The new settings
>> are damn annoying... My FIDs look like 1.000.400 :(
>>
> This is how numbers are supposed to look in your (german?) locale.

Exactly, f.e. locale for money "1.000.000,00 Euro"

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Alessandro Pasotti-2
On Fri, Jun 29, 2018 at 12:28 PM, Tobias Wendorff <[hidden email]> wrote:
Am Fr, 29.06.2018, 12:20 schrieb Alessandro Pasotti:
> No: not yet, for now you need to change your operating system
> settings but nothing prevents us to implement this as an override
> in the QGIS options locale section.

I've give an +1.0000E+12 on this :D

>> The new settings
>> are damn annoying... My FIDs look like 1.000.400 :(
>>
> This is how numbers are supposed to look in your (german?) locale.

Exactly, f.e. locale for money "1.000.000,00 Euro"


I looked into this: the problem is that you can customize the group separator (thousands) and/or omit it completely but you cannot customize the decimal point without changing the whole locale (the locale also defines currency and other settings that are not currently used by QGIS).

So, the best solution here would probably be:

- allow the user to override system locale as a whole (same widget that we have for the translations)
- add an option to omit the group separator

This way you could set QGIS to have the decimal point from your locale or from any other locale and you could set it to omit the group separator, but you would not be able to choose a group separator different from the locale you selected.

How does it sound?

--
Alessandro Pasotti
w3:   www.itopen.it

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Matthias Kuhn 🌍
On 06/29/2018 07:01 AM, Alessandro Pasotti wrote:
On Fri, Jun 29, 2018 at 12:28 PM, Tobias Wendorff <[hidden email]> wrote:
Am Fr, 29.06.2018, 12:20 schrieb Alessandro Pasotti:
> No: not yet, for now you need to change your operating system
> settings but nothing prevents us to implement this as an override
> in the QGIS options locale section.

I've give an +1.0000E+12 on this :D

>> The new settings
>> are damn annoying... My FIDs look like 1.000.400 :(
>>
> This is how numbers are supposed to look in your (german?) locale.

Exactly, f.e. locale for money "1.000.000,00 Euro"


I looked into this: the problem is that you can customize the group separator (thousands) and/or omit it completely but you cannot customize the decimal point without changing the whole locale (the locale also defines currency and other settings that are not currently used by QGIS).

So, the best solution here would probably be:

- allow the user to override system locale as a whole (same widget that we have for the translations)
- add an option to omit the group separator

This way you could set QGIS to have the decimal point from your locale or from any other locale and you could set it to omit the group separator, but you would not be able to choose a group separator different from the locale you selected.

How does it sound?


What do you think about a radio button for Number formatting

 - "According to system locale"
 - "According to locale [combobox]"
 - "No formatting"

I believe the last one deserves its quick setting. I am not sure if someone wants to omit the group separator and have a custom decimal point, then ok.

--
Matthias Kuhn
[hidden email]
<a href="tel:+41764356763">+41 (0)76 435 67 63

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Claas Leiner-2
In reply to this post by Alessandro Pasotti-2
Hi,

In my opinion, no representation of a thousand separator in the
attribute table is required. This is confusing for the users. By
default, the attribute table should show only data, not a representation.
If needed, it can be created using the expression format_number ().

format_number(11615,0) returns 11.615
format_number(11615,2) returns 11.615,00

This is easier than in the operating system settings.

Claas
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Alessandro Pasotti-2
In reply to this post by Matthias Kuhn 🌍
On Fri, Jun 29, 2018 at 2:11 PM, Matthias Kuhn <[hidden email]> wrote:
On 06/29/2018 07:01 AM, Alessandro Pasotti wrote:
On Fri, Jun 29, 2018 at 12:28 PM, Tobias Wendorff <[hidden email]> wrote:
Am Fr, 29.06.2018, 12:20 schrieb Alessandro Pasotti:
> No: not yet, for now you need to change your operating system
> settings but nothing prevents us to implement this as an override
> in the QGIS options locale section.

I've give an +1.0000E+12 on this :D

>> The new settings
>> are damn annoying... My FIDs look like 1.000.400 :(
>>
> This is how numbers are supposed to look in your (german?) locale.

Exactly, f.e. locale for money "1.000.000,00 Euro"


I looked into this: the problem is that you can customize the group separator (thousands) and/or omit it completely but you cannot customize the decimal point without changing the whole locale (the locale also defines currency and other settings that are not currently used by QGIS).

So, the best solution here would probably be:

- allow the user to override system locale as a whole (same widget that we have for the translations)
- add an option to omit the group separator

This way you could set QGIS to have the decimal point from your locale or from any other locale and you could set it to omit the group separator, but you would not be able to choose a group separator different from the locale you selected.

How does it sound?


What do you think about a radio button for Number formatting

The problem is that QLocale does not allow to only format numbers: you get all from a locale (date, currency etc.) or none, which is not currently a big problem because we only format dates and numbers (AFAIK), but using QLocale::setDefault at the application level seems to me the right solution for the long term.
 

 - "According to system locale"
 - "According to locale [combobox]"
 - "No formatting"


I'm afraid that the last one requires changes through all the code and the implementation of custom validators and custom widgets, so I believe it's a no go, unless we wanted to go back to UI inconsistencies where some widgets use system locale (scale and coordinates to cite some) and some other don't and get back to a certain number of bugs that this implementation fixed.


I'm working on my proposed solution, let's see if that suit all needs (I think it should: at least you should have the "old" behavior with dot and no group separator without the old inconsistencies).


Btw, there is already a workaround: change your number formatting options at the operating system level and QGIS will respect your choices.


--
Alessandro Pasotti
w3:   www.itopen.it

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Matthias Kuhn 🌍
On 06/29/2018 07:36 AM, Alessandro Pasotti wrote:
On Fri, Jun 29, 2018 at 2:11 PM, Matthias Kuhn <[hidden email]> wrote:
On 06/29/2018 07:01 AM, Alessandro Pasotti wrote:
On Fri, Jun 29, 2018 at 12:28 PM, Tobias Wendorff <[hidden email]> wrote:
 

 - "According to system locale"
 - "According to locale [combobox]"
 - "No formatting"


I'm afraid that the last one requires changes through all the code and the implementation of custom validators and custom widgets, so I believe it's a no go, unless we wanted to go back to UI inconsistencies where some widgets use system locale (scale and coordinates to cite some) and some other don't and get back to a certain number of bugs that this implementation fixed.


Will it not work if the last option does QLocale.setDefault(QLocale::c()); ?

--
Matthias Kuhn
[hidden email]
<a href="tel:+41764356763">+41 (0)76 435 67 63

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Alessandro Pasotti-2

On Fri, Jun 29, 2018 at 2:39 PM, Matthias Kuhn <[hidden email]> wrote:
On 06/29/2018 07:36 AM, Alessandro Pasotti wrote:
On Fri, Jun 29, 2018 at 2:11 PM, Matthias Kuhn <[hidden email]> wrote:
On 06/29/2018 07:01 AM, Alessandro Pasotti wrote:
On Fri, Jun 29, 2018 at 12:28 PM, Tobias Wendorff <[hidden email]> wrote:
 

 - "According to system locale"
 - "According to locale [combobox]"
 - "No formatting"


I'm afraid that the last one requires changes through all the code and the implementation of custom validators and custom widgets, so I believe it's a no go, unless we wanted to go back to UI inconsistencies where some widgets use system locale (scale and coordinates to cite some) and some other don't and get back to a certain number of bugs that this implementation fixed.


Will it not work if the last option does QLocale.setDefault(QLocale::c()); ?


Maybe (I've recently messed with that from O.S. settings and got unicode issues but that might not affect C++ code), but why do you want to loose the possibility to user your favorite locale's decimal point without having the group separator?


--
Alessandro Pasotti
w3:   www.itopen.it

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Matthias Kuhn 🌍
On 06/29/2018 07:47 AM, Alessandro Pasotti wrote:

On Fri, Jun 29, 2018 at 2:39 PM, Matthias Kuhn <[hidden email]> wrote:
On 06/29/2018 07:36 AM, Alessandro Pasotti wrote:
On Fri, Jun 29, 2018 at 2:11 PM, Matthias Kuhn <[hidden email]> wrote:
On 06/29/2018 07:01 AM, Alessandro Pasotti wrote:
On Fri, Jun 29, 2018 at 12:28 PM, Tobias Wendorff <[hidden email]> wrote:
 

 - "According to system locale"
 - "According to locale [combobox]"
 - "No formatting"


I'm afraid that the last one requires changes through all the code and the implementation of custom validators and custom widgets, so I believe it's a no go, unless we wanted to go back to UI inconsistencies where some widgets use system locale (scale and coordinates to cite some) and some other don't and get back to a certain number of bugs that this implementation fixed.


Will it not work if the last option does QLocale.setDefault(QLocale::c()); ?


Maybe (I've recently messed with that from O.S. settings and got unicode issues but that might not affect C++ code), but why do you want to loose the possibility to user your favorite locale's decimal point without having the group separator?

What I want is a quick option for people to disable both separators, without having to dig into details about which locale might offer this. I think that's the most common request.
For the manual configuration of the group separators, if you can see a use-case for that I don't mind, I just could not think of one.

--
Matthias Kuhn
[hidden email]
<a href="tel:+41764356763">+41 (0)76 435 67 63

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Andreas Neumann-4
In reply to this post by Tobias Wendorff
I have to agree with Tobias here. It is the most annoying new "feature"
in QGIS 3x - this localizing of numeric values (decimal point and
thousand separator). It causes many troubles.

Plus: keep in mind that there are countries where several systems are in
place. It shouldn't be forced on the user by the operating system
setting. In Switzerland, some cantons use the "point" as decimal
separator, while in other cantons, they use the "comma".

I would very much appreciate if there could be separate settings how to
treat decimal point and thousand separator. The current behavior bothers
me a lot.

Andreas


Am 29.06.2018 um 12:10 schrieb Tobias Wendorff:

> Am Fr, 29.06.2018, 11:53 schrieb Alessandro Pasotti:
>> It's operating system and window manager dependent.
>>
>> Usually under "language/country" settings.
> Oh okay. I thought, QGIS would have its own settings. The new settings
> are damn annoying... My FIDs look like 1.000.400 :(
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: qgis 3.2 attribute table thousand separator

Alessandro Pasotti-2


On Fri, Jun 29, 2018 at 3:24 PM, Andreas Neumann <[hidden email]> wrote:
I have to agree with Tobias here. It is the most annoying new "feature" in QGIS 3x - this localizing of numeric values (decimal point and thousand separator). It causes many troubles.

Plus: keep in mind that there are countries where several systems are in place. It shouldn't be forced on the user by the operating system setting. In Switzerland, some cantons use the "point" as decimal separator, while in other cantons, they use the "comma".

Hi Andreas,

Maybe worth a longer explanation:

0. the O.S. settings are in fact user settings: the user can choose whether to use a comma, a dot etc. by configuration in the O.S. in user space
1. this changes were necessary to fix bugs introduced by widgets changes in QGIS that prevented (among other things) to enter doubles for systems where decimal point was not a dot, this is not a feature but a bug fix
2. the old situation was messy: some widgets in the UI were honoring the O.S. settings some were not

The current situation tries to remove the inconsistencies (or at least the majority of them) and leaves to the user the possibility to configure the system.


I would very much appreciate if there could be separate settings how to treat decimal point and thousand separator. The current behavior bothers me a lot.

There is already,  it's not in QGIS application but in the O.S. settings.

Btw, adding an option to override O.S. settings at the QGIS level is on the way:


--

Alessandro Pasotti
w3:   www.itopen.it

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user