@@ -363,8 +363,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
363
363
}
364
364
QString myLayerDefaultCrs = settings.value ( " /Projections/layerDefaultCrs" , GEO_EPSG_CRS_AUTHID ).toString ();
365
365
mLayerDefaultCrs .createFromOgcWmsCrs ( myLayerDefaultCrs );
366
- // display the crs as friendly text rather than in wkt
367
- leLayerGlobalCrs->setText ( mLayerDefaultCrs .authid () + " - " + mLayerDefaultCrs .description () );
366
+ leLayerGlobalCrs->setCrs ( mLayerDefaultCrs );
368
367
369
368
// on the fly CRS transformation settings
370
369
// it would be logical to have single settings value but originaly the radio buttons were checkboxes
@@ -383,8 +382,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
383
382
384
383
QString myDefaultCrs = settings.value ( " /Projections/projectDefaultCrs" , GEO_EPSG_CRS_AUTHID ).toString ();
385
384
mDefaultCrs .createFromOgcWmsCrs ( myDefaultCrs );
386
- // display the crs as friendly text rather than in wkt
387
- leProjectGlobalCrs->setText ( mDefaultCrs .authid () + " - " + mDefaultCrs .description () );
385
+ leProjectGlobalCrs->setCrs ( mDefaultCrs );
388
386
389
387
// default datum transformations
390
388
settings.beginGroup ( " /Projections" );
@@ -1454,49 +1452,14 @@ void QgsOptions::on_mBoldGroupBoxTitleChkBx_clicked( bool chkd )
1454
1452
mStyleSheetBuilder ->buildStyleSheet ( mStyleSheetNewOpts );
1455
1453
}
1456
1454
1457
- void QgsOptions::on_pbnSelectProjection_clicked ( )
1455
+ void QgsOptions::on_leProjectGlobalCrs_crsChanged (QgsCoordinateReferenceSystem crs )
1458
1456
{
1459
- QSettings settings;
1460
- QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector ( this );
1461
-
1462
- // find out crs id of current proj4 string
1463
- mySelector->setSelectedCrsId ( mLayerDefaultCrs .srsid () );
1464
-
1465
- if ( mySelector->exec () )
1466
- {
1467
- mLayerDefaultCrs .createFromOgcWmsCrs ( mySelector->selectedAuthId () );
1468
- QgsDebugMsg ( QString ( " Setting default project CRS to : %1" ).arg ( mySelector->selectedAuthId () ) );
1469
- leLayerGlobalCrs->setText ( mLayerDefaultCrs .authid () + " - " + mLayerDefaultCrs .description () );
1470
- QgsDebugMsg ( QString ( " ------ Global Layer Default Projection Selection set to ----------\n %1" ).arg ( leLayerGlobalCrs->text () ) );
1471
- }
1472
- else
1473
- {
1474
- QgsDebugMsg ( " ------ Global Layer Default Projection Selection change cancelled ----------" );
1475
- QApplication::restoreOverrideCursor ();
1476
- }
1477
-
1457
+ mDefaultCrs = crs;
1478
1458
}
1479
1459
1480
- void QgsOptions::on_pbnSelectOtfProjection_clicked ( )
1460
+ void QgsOptions::on_leLayerGlobalCrs_crsChanged (QgsCoordinateReferenceSystem crs )
1481
1461
{
1482
- QSettings settings;
1483
- QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector ( this );
1484
-
1485
- // find out crs id of current proj4 string
1486
- mySelector->setSelectedCrsId ( mDefaultCrs .srsid () );
1487
-
1488
- if ( mySelector->exec () )
1489
- {
1490
- mDefaultCrs .createFromOgcWmsCrs ( mySelector->selectedAuthId () );
1491
- QgsDebugMsg ( QString ( " Setting default project CRS to : %1" ).arg ( mySelector->selectedAuthId () ) );
1492
- leProjectGlobalCrs->setText ( mDefaultCrs .authid () + " - " + mDefaultCrs .description () );
1493
- QgsDebugMsg ( QString ( " ------ Global OTF Projection Selection set to ----------\n %1" ).arg ( leProjectGlobalCrs->text () ) );
1494
- }
1495
- else
1496
- {
1497
- QgsDebugMsg ( " ------ Global OTF Projection Selection change cancelled ----------" );
1498
- QApplication::restoreOverrideCursor ();
1499
- }
1462
+ mLayerDefaultCrs = crs;
1500
1463
}
1501
1464
1502
1465
void QgsOptions::on_lstGdalDrivers_itemDoubleClicked ( QTreeWidgetItem * item, int column )
0 commit comments