diff --git a/src/gui/qgsprojectionselectiontreewidget.cpp b/src/gui/qgsprojectionselectiontreewidget.cpp index ffe1d2830e7..c1f46927fa9 100644 --- a/src/gui/qgsprojectionselectiontreewidget.cpp +++ b/src/gui/qgsprojectionselectiontreewidget.cpp @@ -277,7 +277,6 @@ void QgsProjectionSelectionTreeWidget::applySelection( int column, QString value lstCoordinateSystems->clearSelection(); lstRecent->clearSelection(); teProjection->clear(); - teSelected->clear(); } } @@ -772,7 +771,6 @@ void QgsProjectionSelectionTreeWidget::lstCoordinateSystems_currentItemChanged( // Found a real CRS emit crsSelected(); - teSelected->setText( selectedName() ); updateBoundsPreview(); QList nodes = lstRecent->findItems( current->text( QgisCrsIdColumn ), Qt::MatchExactly, QgisCrsIdColumn ); @@ -790,10 +788,9 @@ void QgsProjectionSelectionTreeWidget::lstCoordinateSystems_currentItemChanged( } else { - // Not an CRS - remove the highlight so the user doesn't get too confused + // Not a CRS - remove the highlight so the user doesn't get too confused current->setSelected( false ); teProjection->clear(); - teSelected->clear(); lstRecent->clearSelection(); } } @@ -872,7 +869,6 @@ void QgsProjectionSelectionTreeWidget::updateFilter() { ( *itr )->setSelected( false ); teProjection->clear(); - teSelected->clear(); } } else if ( ( *itr )->text( NameColumn ).contains( re ) @@ -996,6 +992,7 @@ void QgsProjectionSelectionTreeWidget::updateBoundsPreview() return; QgsRectangle rect = currentCrs.bounds(); + QString extentString = tr( "Extent not known" ); if ( !qgsDoubleNear( rect.area(), 0.0 ) ) { QgsGeometry geom; @@ -1017,22 +1014,22 @@ void QgsProjectionSelectionTreeWidget::updateBoundsPreview() mAreaCanvas->setExtent( extent ); mAreaCanvas->refresh(); mPreviewBand->show(); - QString extentString = tr( "Extent: %1, %2, %3, %4" ) - .arg( rect.xMinimum(), 0, 'f', 2 ) - .arg( rect.yMinimum(), 0, 'f', 2 ) - .arg( rect.xMaximum(), 0, 'f', 2 ) - .arg( rect.yMaximum(), 0, 'f', 2 ); - QString proj4String = tr( "Proj4: %1" ).arg( selectedProj4String() ); - teProjection->setText( extentString + "\n" + proj4String ); + extentString = QStringLiteral( "%1, %2, %3, %4" ) + .arg( rect.xMinimum(), 0, 'f', 2 ) + .arg( rect.yMinimum(), 0, 'f', 2 ) + .arg( rect.xMaximum(), 0, 'f', 2 ) + .arg( rect.yMaximum(), 0, 'f', 2 ); + } else { mPreviewBand->hide(); mAreaCanvas->zoomToFullExtent(); - QString extentString = tr( "Extent: Extent not known" ); - QString proj4String = tr( "Proj4: %1" ).arg( selectedProj4String() ); - teProjection->setText( extentString + "\n" + proj4String ); } + + QString extentHtml = QStringLiteral( "
%1
%2
" ).arg( tr( "Extent" ), extentString ); + QString proj4String = tr( "
%1
%2
" ).arg( tr( "Proj4" ), selectedProj4String() ); + teProjection->setText( QStringLiteral( "

%1

" ).arg( selectedName() ) + extentHtml + proj4String + QLatin1String( "
" ) ); } QStringList QgsProjectionSelectionTreeWidget::authorities() diff --git a/src/ui/qgsprojectionselectorbase.ui b/src/ui/qgsprojectionselectorbase.ui index 56bc0179a5f..93adba34ed5 100644 --- a/src/ui/qgsprojectionselectorbase.ui +++ b/src/ui/qgsprojectionselectorbase.ui @@ -36,6 +36,16 @@ 0 + + + + Use this option to treat all coordinates as Cartesian coordinates in an unknown reference system. + + + No projection (or unknown/non-Earth projection) + + + @@ -57,168 +67,7 @@ 0 - - - - Qt::Vertical - - - true - - - - - 0 - 0 - - - - - 0 - 105 - - - - - 16777215 - 200 - - - - true - - - false - - - true - - - 3 - - - - Coordinate Reference System - - - - - Authority ID - - - - - ID - - - - - - - 0 - - - - - 0 - - - - - - 75 - true - - - - Coordinate reference systems of the world - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 9 - - - - Hide deprecated CRSs - - - - - - - - - true - - - true - - - 3 - - - - Coordinate Reference System - - - - - Authority ID - - - - - ID - - - - - - - - - - - 75 - true - - - - Selected CRS - - - - - - - true - - - - - - - - - - + @@ -232,7 +81,7 @@ - + @@ -245,6 +94,135 @@ + + + + + 0 + 0 + + + + + 0 + 105 + + + + + 16777215 + 200 + + + + true + + + false + + + true + + + 3 + + + + Coordinate Reference System + + + + + Authority ID + + + + + ID + + + + + + + + 0 + + + + + true + + + true + + + 3 + + + + Coordinate Reference System + + + + + Authority ID + + + + + ID + + + + + + + + 0 + + + + + + 75 + true + + + + Coordinate reference systems of the world + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 9 + + + + Hide deprecated CRSs + + + + + + + @@ -318,16 +296,6 @@ - - - - Use this option to treat all coordinates as Cartesian coordinates in an unknown reference system. - - - No projection (or unknown/non-Earth projection) - - - @@ -349,7 +317,6 @@ lstRecent cbxHideDeprecated lstCoordinateSystems - teSelected