Skip to content

Commit

Permalink
Add an error message on auxiliary field deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Oct 21, 2018
1 parent 7ad0dcf commit 86f1385
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -1822,4 +1822,12 @@ void QgsVectorLayerProperties::deleteAuxiliaryField( int index )
updateAuxiliaryStoragePage( true );
mSourceFieldsPropertiesDialog->init();
}
else
{
const QString title = QObject::tr( "Delete Auxiliary Field" );
const int timeout = QgisApp::instance()->messageTimeout();
const QString errors = mLayer->auxiliaryLayer()->commitErrors().join( QStringLiteral( "\n " ) );
const QString msg = QObject::tr( "Unable to remove auxiliary field (%1)" ).arg( errors );
QgisApp::instance()->messageBar()->pushMessage( title, msg, Qgis::Warning, timeout );
}
}

0 comments on commit 86f1385

Please sign in to comment.