@@ -3301,7 +3301,7 @@ void QgisApp::fileNew( bool thePromptToSaveFlag, bool forceBlank )
3301
3301
// write the projections _proj string_ to project settings
3302
3302
prj->writeEntry ( " SpatialRefSys" , " /ProjectCRSProj4String" , srs.toProj4 () );
3303
3303
prj->writeEntry ( " SpatialRefSys" , " /ProjectCrs" , srs.authid () );
3304
- prj->writeEntry ( " SpatialRefSys" , " /ProjectCRSID" , (int ) srs.srsid () );
3304
+ prj->writeEntry ( " SpatialRefSys" , " /ProjectCRSID" , ( int ) srs.srsid () );
3305
3305
prj->dirty ( false );
3306
3306
if ( srs.mapUnits () != QGis::UnknownUnit )
3307
3307
{
@@ -5884,6 +5884,7 @@ QgsVectorLayer * QgisApp::pasteToNewMemoryVector()
5884
5884
if ( !message.isEmpty () )
5885
5885
{
5886
5886
QMessageBox::warning ( this , tr ( " Warning" ), message , QMessageBox::Ok );
5887
+ return 0 ;
5887
5888
}
5888
5889
5889
5890
QgsVectorLayer * layer = new QgsVectorLayer ( typeName, " pasted_features" , " memory" );
@@ -8475,6 +8476,8 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
8475
8476
mActionCutFeatures ->setEnabled ( false );
8476
8477
mActionCopyFeatures ->setEnabled ( false );
8477
8478
mActionPasteFeatures ->setEnabled ( false );
8479
+ mActionPasteAsNewVector ->setEnabled ( false );
8480
+ mActionPasteAsNewMemoryVector ->setEnabled ( false );
8478
8481
mActionCopyStyle ->setEnabled ( false );
8479
8482
mActionPasteStyle ->setEnabled ( false );
8480
8483
@@ -8585,7 +8588,11 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
8585
8588
updateUndoActions ();
8586
8589
}
8587
8590
8588
- mActionPasteFeatures ->setEnabled ( isEditable && canAddFeatures && !clipboard ()->empty () );
8591
+ bool canPasteFeatures = isEditable && canAddFeatures && !clipboard ()->empty ();
8592
+ mActionPasteFeatures ->setEnabled ( canPasteFeatures );
8593
+ mActionPasteAsNewVector ->setEnabled ( canPasteFeatures );
8594
+ mActionPasteAsNewMemoryVector ->setEnabled ( canPasteFeatures );
8595
+
8589
8596
mActionAddFeature ->setEnabled ( isEditable && canAddFeatures );
8590
8597
8591
8598
// does provider allow deleting of features?
@@ -8735,6 +8742,8 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
8735
8742
mActionCopyFeatures ->setEnabled ( false );
8736
8743
mActionCutFeatures ->setEnabled ( false );
8737
8744
mActionPasteFeatures ->setEnabled ( false );
8745
+ mActionPasteAsNewVector ->setEnabled ( false );
8746
+ mActionPasteAsNewMemoryVector ->setEnabled ( false );
8738
8747
mActionRotatePointSymbols ->setEnabled ( false );
8739
8748
mActionDeletePart ->setEnabled ( false );
8740
8749
mActionDeleteRing ->setEnabled ( false );
0 commit comments