mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
parent
49037e050a
commit
15975c1d51
@ -26,6 +26,7 @@ QgsAnnotationLayer::QgsAnnotationLayer( const QString &name, const LayerOptions
|
|||||||
: QgsMapLayer( QgsMapLayerType::AnnotationLayer, name )
|
: QgsMapLayer( QgsMapLayerType::AnnotationLayer, name )
|
||||||
, mTransformContext( options.transformContext )
|
, mTransformContext( options.transformContext )
|
||||||
{
|
{
|
||||||
|
mShouldValidateCrs = false;
|
||||||
mValid = true;
|
mValid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon
|
|||||||
QDomNode srsNode = layerElement.namedItem( QStringLiteral( "srs" ) );
|
QDomNode srsNode = layerElement.namedItem( QStringLiteral( "srs" ) );
|
||||||
mCRS.readXml( srsNode );
|
mCRS.readXml( srsNode );
|
||||||
mCRS.setValidationHint( tr( "Specify CRS for layer %1" ).arg( mne.text() ) );
|
mCRS.setValidationHint( tr( "Specify CRS for layer %1" ).arg( mne.text() ) );
|
||||||
if ( isSpatial() )
|
if ( isSpatial() && type() != QgsMapLayerType::AnnotationLayer )
|
||||||
mCRS.validate();
|
mCRS.validate();
|
||||||
savedCRS = mCRS;
|
savedCRS = mCRS;
|
||||||
|
|
||||||
@ -770,7 +770,7 @@ void QgsMapLayer::setCrs( const QgsCoordinateReferenceSystem &srs, bool emitSign
|
|||||||
{
|
{
|
||||||
mCRS = srs;
|
mCRS = srs;
|
||||||
|
|
||||||
if ( mShouldValidateCrs && isSpatial() && !mCRS.isValid() )
|
if ( mShouldValidateCrs && isSpatial() && !mCRS.isValid() && type() != QgsMapLayerType::AnnotationLayer )
|
||||||
{
|
{
|
||||||
mCRS.setValidationHint( tr( "Specify CRS for layer %1" ).arg( name() ) );
|
mCRS.setValidationHint( tr( "Specify CRS for layer %1" ).arg( name() ) );
|
||||||
mCRS.validate();
|
mCRS.validate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user