update CRS icon in the statusbar when project is cleared and default CRS

is set to "no projection" (fix #53768)
This commit is contained in:
Alexander Bruy 2025-06-09 10:20:14 +01:00 committed by Nyall Dawson
parent eaf2a88aa2
commit 9423abac6b

View File

@ -4373,6 +4373,9 @@ void QgisApp::setupConnections()
// project crs connections
connect( QgsProject::instance(), &QgsProject::crsChanged, this, &QgisApp::projectCrsChanged );
// When default project CRS is set to "no projection" and new project is created we need to update
// mOnTheFlyProjectionStatusButton with the correct icon, see https://github.com/qgis/QGIS/issues/53768
connect( QgsProject::instance(), &QgsProject::cleared, this, &QgisApp::updateCrsStatusBar );
connect( QgsProject::instance()->viewSettings(), &QgsProjectViewSettings::mapScalesChanged, this, [=] { mScaleWidget->updateScales(); } );