QGIS icon indicating copy to clipboard operation
QGIS copied to clipboard

Make original (raw) attribute values visible and copyable in Attributetable and Identify Result

Open signedav opened this issue 5 months ago • 6 comments

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: image

image

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.

image

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):

image

Btw. preview values get truncated after 12 chars: image

As well the tooltips are improved that if the original value differs from the display value, the original value is written in brackets:

image image

signedav avatar Oct 31 '25 13:10 signedav

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

signedav avatar Oct 31 '25 13:10 signedav

🪟 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)

github-actions[bot] avatar Oct 31 '25 15:10 github-actions[bot]

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)

nyalldawson avatar Nov 04 '25 03:11 nyalldawson

Good idea @nyalldawson I'll check it out.

signedav avatar Nov 04 '25 08:11 signedav

Implemented the preview text. Truncated to 12. I think it's a reasonable value but no strong opinion.

signedav avatar Nov 04 '25 09:11 signedav

Would it be possible for you to review this @nyalldawson ?

signedav avatar Nov 11 '25 07:11 signedav