Skip to content
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

Copying objects containing multiline strings into another project does not work properly #44989

Closed
2 tasks done
keepcool13 opened this issue Sep 8, 2021 · 1 comment · Fixed by #45129
Closed
2 tasks done
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Editing

Comments

@keepcool13
Copy link

keepcool13 commented Sep 8, 2021

What is the bug or the crash?

When copying an object that has an attribute that contains multiline strings and pasting it into another project (and file), the pasted feature contains only the first line of the strings prefixed with a quotation mark. Additional empty features are created for each line of the string.

Steps to reproduce the issue

  1. Create two projects.
  2. In one of the projects, create and save a layer containing a string attribute (I used a point layer in a geopackage, not sure if the same bug occurs in other geometry and file formats).
  3. Duplicate the file, add the copy to the second project.
  4. In both layers, set the attribute form to use a multiline editor.
  5. In one of the Projects, add a feature, and enter a text containing at least two lines. Save the layer.
    Original_feature_map
    Original_feature_attribute_table
  6. Select the feature and copy it (e.g. using ctrl+c). The copied text is:
    wkt_geom fid Text
    Point (8.08380731245052253 53.5389454326587142) 1 "This is a string
    that continues in a second line"
  7. Go into the other project and paste it (ctrl+v).
  8. There are multiple features in the attribute table. In the first one, there is only the first line of the string, prefixed with a ". The others are empty.
    Copied_feature_map
    Copied_feature_attribute_table

Versions

QGIS-Version
3.20.2-Odense
QGIS-Codeversion
9f59a15
Qt-Version
5.15.2
Python-Version
3.9.5
GDAL-Version
3.3.1
PROJ-Version
8.1.0
EPSG-Registraturdatenbankversion
v10.027 (2021-06-17)
GEOS-Version
3.9.1-CAPI-1.14.2
SQLite-Version
3.35.2
PDAL-Versio
2.3.0
PostgreSQL-Client-Version
13.0
SpatiaLite-Version
5.0.1
QWT-Version
6.1.3
QScintilla2-Version
2.11.5
BS-Version
Windows 10 Version 2009

and

QGIS-Version
3.16.9-Hannover
QGIS-Codeversion
9f8d2f7
Kompiliert gegen Qt
5.15.2
Laufendes Qt
5.15.2
Kompiliert mit GDAL/OGR
3.3.1
Läuft mit GDAL/OGR
3.3.1
Kompiliert mit GEOS
3.9.1-CAPI-1.14.2
Läuft mit GEOS
3.9.1-CAPI-1.14.2
Kompiliert mit SQLite
3.35.2
Läuft mit SQLite
3.35.2
PostgreSQL-Client-Version
13.0
SpatiaLite-Version
5.0.1
QWT-Version
6.1.3
QScintilla2-Version
2.11.5
Kompiliert mit PROJ
8.1.0
Läuft mit PROJ
Rel. 8.1.0, July 1st, 2021
BS-Version
Windows 10 Version 2009
Aktive Python-Erweiterungen
GeoCoding;
quick_map_services;
wfsclient;
db_manager;
MetaSearch;
processing
Aktive Python-Erweiterungen
GeoCoding
quick_map_services
wfsclient
db_manager
MetaSearch
processing

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@keepcool13 keepcool13 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 8, 2021
@gioman gioman added the Editing label Sep 8, 2021
@troopa81 troopa81 assigned troopa81 and unassigned troopa81 Sep 14, 2021
@elpaso elpaso self-assigned this Sep 16, 2021
@elpaso
Copy link
Contributor

elpaso commented Sep 16, 2021

Confirmed, note that you need to have two separate QGIS instances to reproduce the issue, switching project in a single instance is not sufficient.

elpaso added a commit to elpaso/QGIS that referenced this issue Sep 18, 2021
espinafre pushed a commit to espinafre/QGIS that referenced this issue Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Editing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants