Skip to content
Permalink
Browse files

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

  • Loading branch information
alexbruy authored and nyalldawson committed Jan 21, 2020
1 parent 7462b64 commit 868a88f929df6ca82e7a7830afe243fd695f32a4
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/qgisapp.cpp
@@ -13356,7 +13356,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 );

@@ -13406,7 +13407,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 868a88f

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