Open faridcher opened 3 months ago
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 NULL
for all 3 fields:
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 06_21_2024-10:27:18_AM.webm
Screencast is perfect, thank you!
Unfortunately, I can't reproduce the issue.
It could be a default setting in QGIS parameters I don't know about. Could you try with a completely new profile?
Thanks
Sure, unfortunately with the new profile, the same problems occur.
Can you test the following please:
string
field (not a NULL value, an empty value)string
value of the pasted feature is NULL or emptyOS: Debian 12 (testing)
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
wkt_geom fid string integer1 decimal1
Point (51.37065479056155937 35.65868137095111479) 1
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 pasting the feature with WKT, creates it as expected. with NULL for all 3 attribute fields. Since I am on Debian, I use its repository to install qgis and not ubuntugis! Gdal 3.9.0
If I copy the feature to xclipboard and paste it with keyboard, the bug shows up again. So it''s clearly from GDAL and Wayland and not QGIS
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:
If I copy the feature to xclipboard and paste it with keyboard, the bug shows up again. So it''s clearly from GDAL and Wayland and not QGIS
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
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". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.
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