@@ -277,7 +277,6 @@ void QgsProjectionSelectionTreeWidget::applySelection( int column, QString value
277
277
lstCoordinateSystems->clearSelection ();
278
278
lstRecent->clearSelection ();
279
279
teProjection->clear ();
280
- teSelected->clear ();
281
280
}
282
281
}
283
282
@@ -772,7 +771,6 @@ void QgsProjectionSelectionTreeWidget::lstCoordinateSystems_currentItemChanged(
772
771
// Found a real CRS
773
772
emit crsSelected ();
774
773
775
- teSelected->setText ( selectedName () );
776
774
updateBoundsPreview ();
777
775
778
776
QList<QTreeWidgetItem *> nodes = lstRecent->findItems ( current->text ( QgisCrsIdColumn ), Qt::MatchExactly, QgisCrsIdColumn );
@@ -790,10 +788,9 @@ void QgsProjectionSelectionTreeWidget::lstCoordinateSystems_currentItemChanged(
790
788
}
791
789
else
792
790
{
793
- // Not an CRS - remove the highlight so the user doesn't get too confused
791
+ // Not a CRS - remove the highlight so the user doesn't get too confused
794
792
current->setSelected ( false );
795
793
teProjection->clear ();
796
- teSelected->clear ();
797
794
lstRecent->clearSelection ();
798
795
}
799
796
}
@@ -872,7 +869,6 @@ void QgsProjectionSelectionTreeWidget::updateFilter()
872
869
{
873
870
( *itr )->setSelected ( false );
874
871
teProjection->clear ();
875
- teSelected->clear ();
876
872
}
877
873
}
878
874
else if ( ( *itr )->text ( NameColumn ).contains ( re )
@@ -996,6 +992,7 @@ void QgsProjectionSelectionTreeWidget::updateBoundsPreview()
996
992
return ;
997
993
998
994
QgsRectangle rect = currentCrs.bounds ();
995
+ QString extentString = tr ( " Extent not known" );
999
996
if ( !qgsDoubleNear ( rect.area (), 0.0 ) )
1000
997
{
1001
998
QgsGeometry geom;
@@ -1017,22 +1014,22 @@ void QgsProjectionSelectionTreeWidget::updateBoundsPreview()
1017
1014
mAreaCanvas ->setExtent ( extent );
1018
1015
mAreaCanvas ->refresh ();
1019
1016
mPreviewBand ->show ();
1020
- QString extentString = tr ( " Extent: %1, %2, %3, %4" )
1021
- .arg ( rect.xMinimum (), 0 , ' f' , 2 )
1022
- .arg ( rect.yMinimum (), 0 , ' f' , 2 )
1023
- .arg ( rect.xMaximum (), 0 , ' f' , 2 )
1024
- .arg ( rect.yMaximum (), 0 , ' f' , 2 );
1025
- QString proj4String = tr ( " Proj4: %1" ).arg ( selectedProj4String () );
1026
- teProjection->setText ( extentString + " \n " + proj4String );
1017
+ extentString = QStringLiteral ( " %1, %2, %3, %4" )
1018
+ .arg ( rect.xMinimum (), 0 , ' f' , 2 )
1019
+ .arg ( rect.yMinimum (), 0 , ' f' , 2 )
1020
+ .arg ( rect.xMaximum (), 0 , ' f' , 2 )
1021
+ .arg ( rect.yMaximum (), 0 , ' f' , 2 );
1022
+
1027
1023
}
1028
1024
else
1029
1025
{
1030
1026
mPreviewBand ->hide ();
1031
1027
mAreaCanvas ->zoomToFullExtent ();
1032
- QString extentString = tr ( " Extent: Extent not known" );
1033
- QString proj4String = tr ( " Proj4: %1" ).arg ( selectedProj4String () );
1034
- teProjection->setText ( extentString + " \n " + proj4String );
1035
1028
}
1029
+
1030
+ QString extentHtml = QStringLiteral ( " <dt><b>%1</b></dt><dd>%2</dd>" ).arg ( tr ( " Extent" ), extentString );
1031
+ QString proj4String = tr ( " <dt><b>%1</b></dt><dd>%2</dd>" ).arg ( tr ( " Proj4" ), selectedProj4String () );
1032
+ teProjection->setText ( QStringLiteral ( " <h3>%1</h3><dl>" ).arg ( selectedName () ) + extentHtml + proj4String + QLatin1String ( " </dl>" ) );
1036
1033
}
1037
1034
1038
1035
QStringList QgsProjectionSelectionTreeWidget::authorities ()
0 commit comments