Skip to content
Permalink
Browse files

Don't show action to set layer CRS to the same CRS as it currently is

  • Loading branch information
nyalldawson committed Sep 23, 2020
1 parent a674cb7 commit 9d384289f9fab0cecc2553df53efe84ee9158764
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgsapplayertreeviewmenuprovider.cpp
@@ -347,9 +347,10 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
int i = 0;
for ( const QgsCoordinateReferenceSystem &crs : recentProjections )
{
QAction *action = menuSetCRS->addAction( tr( "Set to %1" ).arg( crs.userFriendlyIdentifier( QgsCoordinateReferenceSystem::ShortString ) ) );
action->setProperty( "crs", crs.toWkt( QgsCoordinateReferenceSystem::WKT_PREFERRED ) );
if ( crs == layer->crs() )
continue;

QAction *action = menuSetCRS->addAction( tr( "Set to %1" ).arg( crs.userFriendlyIdentifier( QgsCoordinateReferenceSystem::ShortString ) ) );
connect( action, &QAction::triggered, this, [ = ]
{
setLayerCrs( crs );

0 comments on commit 9d38428

Please sign in to comment.
You can’t perform that action at this time.