when Copy and Paste profiles from one SpectralView to another, all (but the "name") the attributes get lost
Comments (10)
-
-
AttributetableWidget implements curSelectedRows addresses
#563resolves#563(Cut button is not deleting selected features)Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 2bb43127b9ee>>
-
- changed status to resolved
AttributetableWidget implements curSelectedRows addresses
#563resolves#563(Cut button is not deleting selected features)Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 2bb43127b9ee>>
-
reporter @benjamin I will open this again, ok? Because the user can’t copy the attributes and has no options to take the field definitions from one speclib to another.
-
To my understanding this is not a bug, as it does the same like QGIS does between two vectorlayers.
Let
Layer1 have fields (“name”,”number”, “xyz”) and
Layer2 have fields (“name”,”number”,”foobar”).In this case copy & paste of features (or “rows”) from Layer1 to Layer2 will ommit values in “xyz”, as the field does not exist in Layer2.
-
And basically I don’t see a way to change this, since operations like copy, paste and cut are done by the QGIS API
-
reporter Can you connect to a signal that emits when a new feature is added? If so you could ask the user if he wants to create the missing fields? Or something along those lines?
-
reporter If not possible, we can close this here and open a new issue for implementing an easy functionality to copy field definitions from one speclib to another.
-
The QgsVectorLayer does not provide a “featureWillBeAdded” signal. In addition, this would be triggered very often, slowing donw the GUI. Instead, having something like “copy field definitions” would be a good addition to Standard QGIS as well.
So yes, could be a new feature request, but - as everything works like known from QGIS - I wouldn’t consider it being a bug
-
reporter having something like “copy field definitions” would be a good addition to Standard QGIS as well.
So yes, could be a new feature request, but - as everything works like known from QGIS - I wouldn’t consider it being a bug
Ok, I’ll open a new issue.
- Log in to comment
are you sure? the screenshot for example shows the “fid” field. Did the missing fields/attributes need to exist in the target library as well. QGIS copies attributes which exist in both QgsVectorLayers only.