Bug report #6407

Sometimes QGIS inserts extra blank lines in the project macros when saving

Added by Alister Hood about 8 years ago. Updated over 6 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 #:15660

Description

Sometimes when I open a different project and QGIS asks if I want to save the current project, and I say yes, it adds an extra newline after every line of code (including blank lines) in the project macros.


Related issues

Duplicated by QGIS Application - Bug report #8267: Line breaks in Metadata Title and Abstract Closed 2013-07-11
Duplicated by QGIS Application - Bug report #7735: QgsProject.writeEntry bugs with line endings Closed 2013-04-29

Associated revisions

Revision d62a4981
Added by Jürgen Fischer over 6 years ago

don't write project files with native line endings on windows
(fixes #6407, fixes #7735, fixes #8267)

History

#1 Updated by Alister Hood about 8 years ago

I'm not 100% sure, but I think this happened on the several occasions when it occurred:
- I opened the project and edited the project macros
- I saved the project
- I tried to open another project and for some reason it asked me to save again

That was on Windows. As far as I can tell, on Linux it never asks you to save the project after you edit the macros, so if nothing else has changed then you lose your changes. And so far I've never had it add all the newlines on Linux.

#2 Updated by Andreas Neumann almost 7 years ago

Interesting.

I observed a similar behavior on Windows if you put metadata in text areas with new-lines (e.g. in the OWS tab (project properties) in the WMS description).

I would assume it is an issue with new-lines that multiply themselves.

#3 Updated by Olivier Dalang almost 7 years ago

Hi !

This is probably a duplicate of #7735

#4 Updated by Jürgen Fischer over 6 years ago

  • Category set to Project Loading/Saving

#5 Updated by Jürgen Fischer over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF