mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
parent
af393490eb
commit
2795ae5fa9
@ -371,9 +371,9 @@ void QgsStatusBarCoordinatesWidget::refreshMapCanvas()
|
||||
mMapCanvas->redrawAllLayers();
|
||||
}
|
||||
|
||||
void QgsStatusBarCoordinatesWidget::showMouseCoordinates( const QgsPointXY &p )
|
||||
void QgsStatusBarCoordinatesWidget::showMouseCoordinates( const QgsPointXY &mapPoint )
|
||||
{
|
||||
mLastCoordinate = p;
|
||||
mLastCoordinate = mapPoint;
|
||||
mLastCoordinateCrs = mMapCanvas->mapSettings().destinationCrs();
|
||||
updateCoordinateDisplay();
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ class APP_EXPORT QgsStatusBarCoordinatesWidget : public QWidget
|
||||
void weAreBored();
|
||||
|
||||
private slots:
|
||||
void showMouseCoordinates( const QgsPointXY &p );
|
||||
void showMouseCoordinates( const QgsPointXY &mapPoint );
|
||||
void extentsViewToggled( bool flag );
|
||||
void validateCoordinates();
|
||||
void dizzy();
|
||||
|
@ -130,7 +130,7 @@ QString QgsCoordinateUtils::formatCoordinateForProject( QgsProject *project, con
|
||||
QgsCoordinateReferenceSystem crs = project->displaySettings()->coordinateCrs();
|
||||
if ( !crs.isValid() && !destCrs.isValid() )
|
||||
{
|
||||
return QString();
|
||||
return QStringLiteral( "%1%2 %3" ).arg( formattedX, QgsCoordinateFormatter::separator(), formattedY );
|
||||
}
|
||||
else if ( !crs.isValid() )
|
||||
{
|
||||
@ -160,6 +160,8 @@ void QgsCoordinateUtils::formatCoordinatePartsForProject( QgsProject *project, c
|
||||
QgsCoordinateReferenceSystem crs = project->displaySettings()->coordinateCrs();
|
||||
if ( !crs.isValid() && !destCrs.isValid() )
|
||||
{
|
||||
x = QgsCoordinateFormatter::formatAsPair( point.x(), precision );
|
||||
y = QgsCoordinateFormatter::formatAsPair( point.y(), precision );
|
||||
return;
|
||||
}
|
||||
else if ( !crs.isValid() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user