Skip to content
Permalink
Browse files

allow pasting layers in an empty project (fix #26710)

  • Loading branch information
github-actions authored and nyalldawson committed Jan 21, 2020
1 parent 2be9fbc commit 767de7c72206b75ac89c8b894f69d5471abef34b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/qgisapp.cpp
@@ -12914,7 +12914,8 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionCopyStyle->setEnabled( false );
mActionPasteStyle->setEnabled( false );
mActionCopyLayer->setEnabled( false );
mActionPasteLayer->setEnabled( false );
// pasting should be allowed if there is a layer in the clipboard
mActionPasteLayer->setEnabled( clipboard()->hasFormat( QStringLiteral( QGSCLIPBOARD_MAPLAYER_MIME ) ) );
mActionReverseLine->setEnabled( false );
mActionTrimExtendFeature->setEnabled( false );

@@ -12964,7 +12965,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionCopyStyle->setEnabled( true );
mActionPasteStyle->setEnabled( clipboard()->hasFormat( QStringLiteral( QGSCLIPBOARD_STYLE_MIME ) ) );
mActionCopyLayer->setEnabled( true );
mActionPasteLayer->setEnabled( clipboard()->hasFormat( QStringLiteral( QGSCLIPBOARD_MAPLAYER_MIME ) ) );

// Vector layers
switch ( layer->type() )

0 comments on commit 767de7c

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