Skip to content

Commit

Permalink
allow pasting layers in an empty project (fix qgis#26710)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 21, 2020
1 parent 2be9fbc commit caab95a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down Expand Up @@ -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() )
Expand Down

0 comments on commit caab95a

Please sign in to comment.