-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy/paste feature tool sets integer/decimal fields of destination feature to 0 if the source feature fields are NULL #57710
Comments
Hello, I can't reproduce the issue on QGIS master nor on QGIS 3.34.7 (Ubuntu 22.04). I tried with
What is the exact tools you used? Are you on Windows version? Thanks |
@Djedouas thank you for testing.
OS: Debian 12 (testing) |
Tested on fedora with QGIS 3.34.6, unable to reproduce.
Every time I have correct fields values of Could you maybe have configured widgets in the attributes form layer parameters? With default values or something? |
@Djedouas I just stared with a new blank project, and added the layer, without any widget configuration (default values). You may verify in the sample project/data files. I can record a video if warranted? |
Yes please it can help. Thanks! |
Screencast |
Sure, unfortunately with the new profile, the same problems occur. |
Can you test the following please:
|
Do you use QGIS package https://ubuntugis.qgis.org/ubuntugis-ltr/ to have QGIS dependencies on Debian testing? At some point QGIS relies on OGR to read the clipboard content and determine field values. What GDAL/OGR version are you using (see in QGIS about menu)? |
Also, can you copy this
and directly paste it in the editable attribute table (or editable layer in the map canvas) please? (note the tabulations at the end of the line) |
I created a VM with Debian 12 testing and was able to reproduce the issue! |
What is strange is that I have the issue when on Debian 12 testing KDE plasma Wayland, but I don't have the issue on Debian 12 testing KDE plasma X11. It might come from the clipboard integration. What do you use? |
I am on Debian 12 with Gnome and Wayland |
Can you provide a screencast of this please? I've found a problem in QGIS clipboard with NULL values for which I will post a fix in a PR next week, but I'm not entirely sure that it's related to your issue. In fact, a feature copy action in QGIS
The paste action in QGIS shoud paste internal copied features object, even if there is text in the clipboard. The problem I found is that inside the clipboard text, NULL values are transformed to 0 (for int and double). In every QGIS version I can reproduce this :
So it seems that your paste action is always taking the text from the clipboard... if it is the case my PR will fix this. I'm not sure that I am being very clear here, but we can continue to investigate later on after the PR is merged. Thanks! |
I take back:
Sure. We will test with your commit later; you may back reference this issue in your PR. Please remove the feedback label so this issue remains open. thanks for your time on this |
Numeric attribues with a NULL value were represented with a 0 value in the system text and html clipboard. Related to qgis#57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to qgis#57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to qgis#57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to qgis#57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to qgis#57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to qgis#57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to qgis#57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to #57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to #57710.
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to #57710.
Numeric attributes with a NULL value were represented with a 0 value in the system text and html clipboard. Related to #57710.
What is the bug or the crash?
copy/paste feature tool sets numeric fields of destination feature to 0 if the source feature fields are NULL. It preserves NULL values of string fields. In the following image, a pasted feature is located northeast of the source feature and is selected. The integer and decimal fields are set to zero arbitrarily!
Steps to reproduce the issue
use the sample data. start editing the point layer and copy/paste the single point and check its attributes.
test.zip
Versions
3.34.6
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: