Make original (raw) attribute values visible and copyable in Attributetable and Identify Result
Description
Current behavior
The values are displayed in it's represented form. Means e.g. numbers are formatted concerning the locale settings or e.g. foreign keys according to the configured display value:
E.g. integer and double value in the German format (with point as thousand separator and comma as decimal sign), as well as the date-time and the text value as representation of the foreign key in a relation (that would otherwise be a UUID).
New feature
Sometimes it's usable to be able to get the value that is actually stored in the data source. This is the new option in the context menu "Copy Raw Cell Content" is introduced.
What would copy here the value "11000.5" instead of 11.000,5 (as we would get it with "Copy Cell Content".
Same is possible in the Identify Result list (on Vector Layers):
Btw. preview values get truncated after 12 chars:
As well the tooltips are improved that if the original value differs from the display value, the original value is written in brackets:
Btw. not sure about the naming "raw" - maybe "original" would be better. For me "stored value" would make sense but not sure if this would make sense for users...
🪟 Windows Qt6 builds
Download Windows Qt6 builds of this PR for testing. (Built from commit 9c0be2c4ff0901a554042a6bce3df724027d1b8a)
🍎 MacOS Qt6 builds
Download MacOS Qt6 builds of this PR for testing.
This installer is not signed, control+click > open the app to avoid the warning
(Built from commit 9c0be2c4ff0901a554042a6bce3df724027d1b8a)
I think it'd be useful to show a (possibly truncated?) preview of the values in the menu entry text too. Eg:
- Copy Cell Content (11.000,5)
- Copy Raw Value (11000.5)
Good idea @nyalldawson I'll check it out.
Implemented the preview text. Truncated to 12. I think it's a reasonable value but no strong opinion.
Would it be possible for you to review this @nyalldawson ?