Skip to content
Permalink
Browse files

Make custom projection validation button work on proj < 6

  • Loading branch information
nyalldawson committed Dec 16, 2019
1 parent 84af693 commit 30b2919c8125ddfbcad460d5e7b3fdd6b04f7410
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/app/qgscustomprojectiondialog.cpp
@@ -515,7 +515,23 @@ void QgsCustomProjectionDialog::validateCurrent()
proj_log_func( context, nullptr, nullptr );
proj_context_destroy( context );
context = nullptr;
#else
projCtx pContext = pj_ctx_alloc();
projPJ proj = pj_init_plus_ctx( pContext, projDef.toLocal8Bit().data() );

if ( proj )
{
QMessageBox::information( this, tr( "Custom Coordinate Reference System" ),
tr( "This proj projection definition is valid." ) );
}
else
{
QMessageBox::warning( this, tr( "Custom Coordinate Reference System" ),
tr( "This proj projection definition is not valid" ) );
}

pj_free( proj );
pj_ctx_free( pContext );
#endif
}

0 comments on commit 30b2919

Please sign in to comment.
You can’t perform that action at this time.