qgis/Quantum-GIS — pull request #533 by leyan (2013-04-16 13:40:19+00:00)
Title: Custom crs api

Following the discussion with mhugent here: https://github.com/qgis/Quantum-GIS/pull/315 , I provide a minimal patch for a small API change concerning custom CRS.

Currently, any call to a function to create a custom CRS will search the user database and automatically save the CRS if it is not found. This prevents reusing the QgsCoordinateReferenceSystem class in some situation (most notably the custom CRS creation dialog).

This patch makes saveAsUserCRS public and adds a new argument, the name of the user CRS. It also removes the call to saveAsUserCRS in the custom CRS creation functions, meaning any user of these functions now has to check manually if the CRS exists in the database.