Skip to content
Permalink
Browse files

print question instead of warning on delete a feature when detected c…

…omposition relations and cascade joins
  • Loading branch information
signedav committed May 8, 2020
1 parent 0b64a83 commit de6aed6666b83bc671cb87a088b8e02a16811722
Showing with 9 additions and 9 deletions.
  1. +3 −3 src/app/qgisapp.cpp
  2. +3 −3 src/app/qgsattributetabledialog.cpp
  3. +3 −3 src/gui/qgsrelationeditorwidget.cpp
@@ -9004,9 +9004,9 @@ void QgisApp::deleteSelected( QgsMapLayer *layer, QWidget *parent, bool checkFea
if ( QgsVectorLayerUtils::impactsCascadeFeatures( vlayer, QgsProject::instance() ) )
{
// for extra safety to make sure we know that the delete can have impact on children and joins
int res = QMessageBox::warning( mMapCanvas, tr( "Possible impact on descendants of layer \"%1\"" ).arg( vlayer->name() ),
tr( "A delete on this layer could have an impact on referencing or joined layers and their descendants. Would you still like to continue?" ),
QMessageBox::Yes | QMessageBox::No );
int res = QMessageBox::question( mMapCanvas, tr( "Possible impact on descendants of layer \"%1\"" ).arg( vlayer->name() ),
tr( "A delete on this layer could have an impact on referencing or joined layers and their descendants. Would you still like to continue?" ),
QMessageBox::Yes | QMessageBox::No );
if ( res != QMessageBox::Yes )
return;
}
@@ -867,9 +867,9 @@ void QgsAttributeTableDialog::deleteFeature( const QgsFeatureId fid )
if ( QgsVectorLayerUtils::impactsCascadeFeatures( mLayer, QgsProject::instance() ) )
{
// for extra safety to make sure we know that the delete can have impact on children and joins
int res = QMessageBox::warning( this, tr( "Possible impact on descendants of layer \"%1\"" ).arg( mLayer->name() ),
tr( "A delete on this layer could have an impact on referencing or joined layers and their descendants. Would you still like to continue?" ),
QMessageBox::Yes | QMessageBox::No );
int res = QMessageBox::question( this, tr( "Possible impact on descendants of layer \"%1\"" ).arg( mLayer->name() ),
tr( "A delete on this layer could have an impact on referencing or joined layers and their descendants. Would you still like to continue?" ),
QMessageBox::Yes | QMessageBox::No );
if ( res != QMessageBox::Yes )
return;
}
@@ -731,9 +731,9 @@ void QgsRelationEditorWidget::deleteFeatures( const QgsFeatureIds &featureids )
if ( QgsVectorLayerUtils::impactsCascadeFeatures( layer, QgsProject::instance() ) )
{
// for extra safety to make sure we know that the delete can have impact on children and joins
int res = QMessageBox::warning( this, tr( "Possible impact on descendants of layer \"%1\"" ).arg( layer->name() ),
tr( "A delete on this layer could have an impact on referencing or joined layers and their descendants. Would you still like to continue?" ),
QMessageBox::Yes | QMessageBox::No );
int res = QMessageBox::question( this, tr( "Possible impact on descendants of layer \"%1\"" ).arg( layer->name() ),
tr( "A delete on this layer could have an impact on referencing or joined layers and their descendants. Would you still like to continue?" ),
QMessageBox::Yes | QMessageBox::No );
if ( res == QMessageBox::No )
deleteFeatures = false;
}

0 comments on commit de6aed6

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