Skip to content
Permalink
Browse files

Do not show standard message bar error with geometry validation errors

  • Loading branch information
m-kuhn committed Oct 1, 2018
1 parent 2abb13f commit 91cd1ed608ef42364faefa1fab4dc23a244793ba
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/app/qgisapp.cpp
@@ -6965,11 +6965,18 @@ void QgisApp::labelingFontNotFound( QgsVectorLayer *vlayer, const QString &fontf

void QgisApp::commitError( QgsVectorLayer *vlayer )
{
const QStringList commitErrors = vlayer->commitErrors();
if ( !vlayer->allowCommit() && commitErrors.empty() )
{
QgsMessageLog::logMessage( tr( "Could not save changes. Geometry validation failed." ) );
return;
}

QgsMessageViewer *mv = new QgsMessageViewer();
mv->setWindowTitle( tr( "Commit Errors" ) );
mv->setMessageAsPlainText( tr( "Could not commit changes to layer %1" ).arg( vlayer->name() )
+ "\n\n"
+ tr( "Errors: %1\n" ).arg( vlayer->commitErrors().join( QStringLiteral( "\n " ) ) )
+ tr( "Errors: %1\n" ).arg( commitErrors.join( QStringLiteral( "\n " ) ) )
);

QToolButton *showMore = new QToolButton();

0 comments on commit 91cd1ed

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