Skip to content
Permalink
Browse files

Fix message boxes titles

  • Loading branch information
DelazJ committed Feb 13, 2018
1 parent 66b9b43 commit e6a57437e540a47f9214986ce0742db863cb6ccb
@@ -2796,7 +2796,7 @@ bool DualEdgeTriangulation::saveToTAFF( QString filename ) const
QFile outputfile( filename );
if ( !outputfile.open( IO_WriteOnly ) )
{
QMessageBox::warning( 0, "warning", "File could not be written", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton );
QMessageBox::warning( 0, tr( "Warning" ), tr( "File could not be written." ), QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton );
return false;
}

@@ -74,7 +74,7 @@ void QgsPoint3DSymbolWidget::onChooseModelClicked( bool )
QFileInfo fileInfo( filePath );
if ( !fileInfo.exists() || !fileInfo.isReadable() )
{
QMessageBox::critical( nullptr, tr( "Invalid file" ), tr( "Error, file does not exist or is not readable" ) );
QMessageBox::critical( nullptr, tr( "Invalid File" ), tr( "Error, file does not exist or is not readable." ) );
return;
}

@@ -788,15 +788,15 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
//lines: bail out if there are not at least two vertices
if ( layerWKBType == QgsWkbTypes::LineString && mCaptureList.size() < 2 )
{
QMessageBox::information( nullptr, tr( "Not enough vertices" ),
QMessageBox::information( nullptr, tr( "Add Feature" ),
tr( "Cannot close a line feature until it has at least two vertices." ) );
return;
}

//polygons: bail out if there are not at least three vertices
if ( layerWKBType == QgsWkbTypes::Polygon && mCaptureList.size() < 3 )
{
QMessageBox::information( nullptr, tr( "Not enough vertices" ),
QMessageBox::information( nullptr, tr( "Add Feature" ),
tr( "Cannot close a polygon feature until it has at least three vertices." ) );
return;
}
@@ -833,7 +833,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
if ( !vlayer->commitChanges() ) //assumed to be vector layer and is editable and is in editing mode (preconditions have been tested)
{
QMessageBox::information( this,
tr( "Error" ),
tr( "Save Layer Edits" ),
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
.arg( vlayer->name(),
vlayer->commitErrors().join( QStringLiteral( "\n " ) ) ) );
@@ -911,14 +911,14 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
else if ( avoidIntersectionsReturn == 2 )
{
//bail out...
QMessageBox::critical( nullptr, tr( "Error" ), tr( "The feature could not be added because removing the polygon intersections would change the geometry type" ) );
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "The feature could not be added because removing the polygon intersections would change the geometry type." ) );
delete f;
connectGpsSlot();
return;
}
else if ( avoidIntersectionsReturn == 3 )
{
QMessageBox::critical( nullptr, tr( "Error" ), tr( "An error was reported during intersection removal" ) );
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "An error was reported during intersection removal." ) );
delete f;
connectGpsSlot();
return;
@@ -927,7 +927,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
// Should never get here, as preconditions should have removed any that aren't handled
else // layerWKBType == QgsWkbTypes::Polygon - unknown type
{
QMessageBox::critical( nullptr, tr( "Error" ), tr( "Cannot add feature. "
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "Cannot add feature. "
"Unknown WKB type. Choose a different layer and try again." ) );
connectGpsSlot();
delete f;
@@ -942,7 +942,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
if ( !vlayer->commitChanges() ) //swiped... er... appropriated from QgisApp saveEdits()
{
QMessageBox::information( this,
tr( "Error" ),
tr( "Save Layer Edits" ),
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
.arg( vlayer->name(),
vlayer->commitErrors().join( QStringLiteral( "\n " ) ) ) );

0 comments on commit e6a5743

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