File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1130,7 +1130,8 @@ long QgsCoordinateReferenceSystem::findMatchingProj()
1130
1130
1131
1131
bool QgsCoordinateReferenceSystem::operator ==( const QgsCoordinateReferenceSystem &theSrs ) const
1132
1132
{
1133
- return mIsValidFlag && theSrs.mIsValidFlag && theSrs.authid () == authid ();
1133
+ return ( !mIsValidFlag && !theSrs.mIsValidFlag ) ||
1134
+ ( mIsValidFlag && theSrs.mIsValidFlag && theSrs.authid () == authid () );
1134
1135
}
1135
1136
1136
1137
bool QgsCoordinateReferenceSystem::operator !=( const QgsCoordinateReferenceSystem &theSrs ) const
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class TestQgsCoordinateReferenceSystem: public QObject
49
49
void validate ();
50
50
void equality ();
51
51
void noEquality ();
52
+ void equalityInvalid ();
52
53
void readXML ();
53
54
void writeXML ();
54
55
void setCustomSrsValidation ();
@@ -312,6 +313,12 @@ void TestQgsCoordinateReferenceSystem::noEquality()
312
313
debugPrint ( myCrs );
313
314
QVERIFY ( myCrs != myCrs2 );
314
315
}
316
+ void TestQgsCoordinateReferenceSystem::equalityInvalid ()
317
+ {
318
+ QgsCoordinateReferenceSystem invalidCrs1;
319
+ QgsCoordinateReferenceSystem invalidCrs2;
320
+ QVERIFY ( invalidCrs1 == invalidCrs2 );
321
+ }
315
322
void TestQgsCoordinateReferenceSystem::readXML ()
316
323
{
317
324
// QgsCoordinateReferenceSystem myCrs;
You can’t perform that action at this time.
0 commit comments