Skip to content

Commit

Permalink
Validation hint shouldn't be shared
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 22, 2020
1 parent b418567 commit e90fb88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -129,12 +129,14 @@ QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const long id, CrsTy

QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem &srs ) //NOLINT
: d( srs.d )
, mValidationHint( srs.mValidationHint )
{
}

QgsCoordinateReferenceSystem &QgsCoordinateReferenceSystem::operator=( const QgsCoordinateReferenceSystem &srs ) //NOLINT
{
d = srs.d;
mValidationHint = srs.mValidationHint;
return *this;
}

Expand Down Expand Up @@ -2238,13 +2240,12 @@ void QgsCoordinateReferenceSystem::debugPrint()

void QgsCoordinateReferenceSystem::setValidationHint( const QString &html )
{
d.detach();
d->mValidationHint = html;
mValidationHint = html;
}

QString QgsCoordinateReferenceSystem::validationHint()
{
return d->mValidationHint;
return mValidationHint;
}

/// Copied from QgsCustomProjectionDialog ///
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgscoordinatereferencesystem.h
Expand Up @@ -960,6 +960,8 @@ class CORE_EXPORT QgsCoordinateReferenceSystem

QExplicitlySharedDataPointer<QgsCoordinateReferenceSystemPrivate> d;

QString mValidationHint;

#if PROJ_VERSION_MAJOR>=6
friend class QgsProjContext;

Expand Down
1 change: 0 additions & 1 deletion src/core/qgscoordinatereferencesystem_p.h
Expand Up @@ -173,7 +173,6 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
OGRSpatialReferenceH mCRS;
#endif

QString mValidationHint;
mutable QString mProj4;

//! True if presence of an inverted axis needs to be recalculated
Expand Down

0 comments on commit e90fb88

Please sign in to comment.