Skip to content

Commit

Permalink
Use correct message box icons in custom projection alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 17, 2019
1 parent 308eae9 commit 4991a27
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/app/qgscustomprojectiondialog.cpp
Expand Up @@ -404,8 +404,8 @@ void QgsCustomProjectionDialog::buttonBox_accepted()
CRS.createFromProj4( mCustomCRSparameters[i] );
if ( !CRS.isValid() )
{
QMessageBox::information( this, tr( "QGIS Custom Projection" ),
tr( "The proj4 definition of '%1' is not valid." ).arg( mCustomCRSnames[i] ) );
QMessageBox::warning( this, tr( "QGIS Custom Projection" ),
tr( "The proj4 definition of '%1' is not valid." ).arg( mCustomCRSnames[i] ) );
return;
}
}
Expand Down Expand Up @@ -476,8 +476,8 @@ void QgsCustomProjectionDialog::pbnCalculate_clicked()

if ( !proj )
{
QMessageBox::information( this, tr( "QGIS Custom Projection" ),
tr( "This proj projection definition is not valid." ) );
QMessageBox::warning( this, tr( "QGIS Custom Projection" ),
tr( "This proj projection definition is not valid." ) );
projectedX->clear();
projectedY->clear();
pj_free( proj );
Expand All @@ -498,8 +498,8 @@ void QgsCustomProjectionDialog::pbnCalculate_clicked()

if ( !okN || !okE )
{
QMessageBox::information( this, tr( "QGIS Custom Projection" ),
tr( "Northing and Easting must be in decimal form." ) );
QMessageBox::warning( this, tr( "QGIS Custom Projection" ),
tr( "Northing and Easting must be in decimal form." ) );
projectedX->clear();
projectedY->clear();
#if PROJ_VERSION_MAJOR<6
Expand All @@ -514,8 +514,8 @@ void QgsCustomProjectionDialog::pbnCalculate_clicked()

if ( !wgs84Proj )
{
QMessageBox::information( this, tr( "QGIS Custom Projection" ),
tr( "Internal Error (source projection invalid?)" ) );
QMessageBox::critical( this, tr( "QGIS Custom Projection" ),
tr( "Internal Error (source projection invalid?)" ) );
projectedX->clear();
projectedY->clear();
pj_free( wgs84Proj );
Expand All @@ -528,8 +528,8 @@ void QgsCustomProjectionDialog::pbnCalculate_clicked()
QgsProjUtils::proj_pj_unique_ptr res( proj_create_crs_to_crs( pContext, "EPSG:4326", projDef.toUtf8(), nullptr ) );
if ( !res )
{
QMessageBox::information( this, tr( "QGIS Custom Projection" ),
tr( "This proj projection definition is not valid." ) );
QMessageBox::warning( this, tr( "QGIS Custom Projection" ),
tr( "This proj projection definition is not valid." ) );
projectedX->clear();
projectedY->clear();
return;
Expand Down

0 comments on commit 4991a27

Please sign in to comment.