On 25 May 2017 at 19:26, Radim Blazek <radim.bla...@gmail.com> wrote: > Hi, > > I found in http://qgis.org/api/api_break.html: > setCrsTransformEnabled(), hasCrsTransformEnabled(), > hasCrsTransformEnabledChanged() were removed. CRS transformation is > now always enabled. > > But in Project Properties CRS there is now "No projection" checkbox > instead of "Enable on the fly reprojection" in QGIS2, so basically the > same, inverted. Which method to use to get 'No projection' state and > which signal is emitted when it is changed? > > QgsProject().instance().crs().isValid() or > QgsProject().instance().crs() == NULL? > QgsProject().instance().crsChanged()?
"No projection" is subtly different to OTF off. No projection is basically a "non earth" mode, where coordinates are treated exactly as they are and all measurements become unitless. QgsProject().instance().crs().isValid() will return false if this mode is turned on. QgsProject().instance().crsChanged() will be emitted when it's switched on or off. Nyall _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer