Bug report #8997

Memory vector layer datasource wrongly written in project

Added by Radim Blazek about 11 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Project Loading/Saving
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17654

Description

Changes to vector memory layer attributes are not written to project file because QgsMapLayer::readLayerXML() is using mDataSource instead of QgsMemoryProvider::dataSourceUri(). QgsMapLayer::readLayerXML() is really very hacky with hardcoded blocks for providers.

Associated revisions

Revision dbc0f072
Added by Sebastian Dietrich almost 9 years ago

read source from provider before saving memory layer (fixes #8997)

Revision 5a42728f
Added by Nyall Dawson almost 9 years ago

Merge pull request #2624 from SebDieBln/SaveMemoryLayerFields

Read source from provider before saving memory layer (fixes #8997)

Revision a6f10f4c
Added by Sebastian Dietrich almost 9 years ago

read source from provider before saving memory layer (fixes #8997)

(cherry picked from commit dbc0f072c638981db982011776d7b110215e80b7)

Revision bc61f758
Added by Sebastian Dietrich almost 9 years ago

read source from provider before saving memory layer (fixes #8997)

(cherry picked from commit dbc0f072c638981db982011776d7b110215e80b7)

History

#1 Updated by Sebastian Dietrich almost 9 years ago

See PR 2624 for a solution.

#2 Updated by Nyall Dawson almost 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF