Skip to content

Commit a8b5583

Browse files
committedJun 3, 2019
Don't show generic proj error message to users
1 parent 1241b3f commit a8b5583

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
 

‎src/core/qgscoordinatetransform_p.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,14 @@ ProjData QgsCoordinateTransformPrivate::threadLocalProjData()
336336
if ( count < 1 )
337337
{
338338
// huh?
339-
if ( int errNo = proj_context_errno( context ) )
339+
int errNo = proj_context_errno( context );
340+
if ( errNo && errNo != -61 )
340341
{
341342
nonAvailableError = QString( proj_errno_string( errNo ) );
342343
}
343344
else
344345
{
345-
nonAvailableError = QObject::tr( "No coordinate operations are available" );
346+
nonAvailableError = QObject::tr( "No coordinate operations are available between these two reference systems" );
346347
}
347348
}
348349
else if ( count == 1 )
@@ -439,13 +440,14 @@ ProjData QgsCoordinateTransformPrivate::threadLocalProjData()
439440

440441
if ( !transform && nonAvailableError.isEmpty() )
441442
{
442-
if ( int errNo = proj_context_errno( context ) )
443+
int errNo = proj_context_errno( context );
444+
if ( errNo && errNo != -61 )
443445
{
444446
nonAvailableError = QString( proj_errno_string( errNo ) );
445447
}
446448
else
447449
{
448-
nonAvailableError = QObject::tr( "No coordinate operations are available" );
450+
nonAvailableError = QObject::tr( "No coordinate operations are available between these two reference systems" );
449451
}
450452
}
451453

@@ -470,7 +472,7 @@ ProjData QgsCoordinateTransformPrivate::threadLocalProjData()
470472
return nullptr;
471473
}
472474

473-
// transform may have either the source or destination CRS using swapped axis order. For QGIS, we ALWAYS need regular x/y axis order
475+
// transform may have either the source or destination CRS using swapped axis order. For QGIS, we ALWAYS need regular x/y axis order
474476
ProjData res = proj_normalize_for_visualization( context, transform.get() );
475477
mProjProjections.insert( reinterpret_cast< uintptr_t>( context ), res );
476478

0 commit comments

Comments
 (0)
Please sign in to comment.