Skip to content
Permalink
Browse files

remove unuseful message managed by pushMessage from provider

  • Loading branch information
luipir committed Sep 26, 2017
1 parent 1e2a213 commit 8a4d32fa215a4a5e613a0accda6ae0b7ae500c05
@@ -7179,11 +7179,6 @@ void QgisApp::mergeSelectedFeatures()
// addFeature can fail if newFeature has no compatibile geometry
if ( !vl->addFeature( newFeature, false ) )
{
messageBar()->pushMessage(
tr( "Merge features" ),
tr( "Invalid edit operation see the log for more info" ),
QgsMessageBar::WARNING );

vl->destroyEditCommand();
}
else
@@ -298,7 +298,7 @@ void QgsFieldCalculator::accept()
if ( !mVectorLayer->changeGeometry( feature.id(), &geom ) )
{
calculationSuccess = false;
error = tr( "Invalid edit operation see the log for more info" );
error = tr( "Can not change geometry for feature: %1", "Field calculator" ).arg( feature.id() );
break;
}
}
@@ -106,11 +106,9 @@ void QgsMapToolDeletePart::canvasReleaseEvent( QgsMapMouseEvent* e )
{
vlayer->beginEditCommand( tr( "Part of multipart feature deleted" ) );
if ( !vlayer->changeGeometry( f.id(), g ) )
{
emit messageEmitted( tr( "Invalid edit operation see the log for more info" ) );
vlayer->destroyEditCommand();
}
vlayer->endEditCommand();
else
vlayer->endEditCommand();
vlayer->triggerRepaint();
}
else
@@ -115,7 +115,6 @@ void QgsMapToolDeleteRing::canvasReleaseEvent( QgsMapMouseEvent* e )
vlayer->beginEditCommand( tr( "Ring deleted" ) );
if ( !vlayer->changeGeometry( mPressedFid, g ) )
{
emit messageEmitted( tr( "Invalid edit operation see the log for more info" ) );
vlayer->destroyEditCommand();
return;
}
@@ -183,7 +183,6 @@ void QgsMapToolOffsetCurve::applyOffset()
}
else
{
emit messageEmitted( tr( "Invalid edit operation see the log for more info" ) );
layer->destroyEditCommand();
}

@@ -136,7 +136,6 @@ void QgsMapToolReshape::cadCanvasReleaseEvent( QgsMapMouseEvent * e )
}
else
{
emit messageEmitted( tr( "Invalid edit operation see the log for more info" ) );
vlayer->destroyEditCommand();
}

@@ -183,7 +183,6 @@ void QgsMapToolSimplify::storeSimplified()
{
if ( !vlayer->changeGeometry( feat.id(), g ) )
{
emit messageEmitted( tr( "Invalid edit operation see the log for more info" ) );
success = false;
}
delete g;
@@ -320,7 +320,7 @@ void QgsOfflineEditing::synchronize()
else
{
remoteLayer->rollBack();
showWarning( tr( "Syncronization failed. see log for more details" ) );
showWarning( tr( "Syncronization failed" ) );
}
}
else
@@ -703,10 +703,7 @@ QgsVectorLayer* QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlit
}

if ( !newLayer->addFeature( f, false ) )
{
showWarning( tr( "Invalid edit operation see the log for more info" ) );
return nullptr;
}

emit progressUpdated( featureCount++ );
}
@@ -200,10 +200,7 @@ bool QgsVectorLayerEditBuffer::adaptGeometry( QgsGeometry* geometry )
{
QgsGeometry* newGeom = provider->convertToProviderType( geometry );
if ( !newGeom )
{
QgsMessageLog::logMessage( tr( "Geometry type is not compatible with the layer.", "not compatible geometry" ), "adaptGeometry", QgsMessageLog::CRITICAL );
return false;
}
geometry = newGeom;
}
}
@@ -228,7 +225,6 @@ bool QgsVectorLayerEditBuffer::changeGeometry( QgsFeatureId fid, QgsGeometry* ge
// if not then try to convert to a compatible geometry type
if ( !adaptGeometry( geom ) )
{
QgsMessageLog::logMessage( tr( "Feature %1 not updated", "not updated feature" ).arg( fid ), "changeGeometry", QgsMessageLog::CRITICAL );
return false;
}

@@ -250,7 +250,7 @@ void QgsGeometryCheckerSetupTab::runChecks()
}
if ( !newlayer->dataProvider()->addFeatures( features ) )
{
QMessageBox::critical( this, tr( "Populate output Layer" ), tr( "See message log. Can not add features to output layer: %1." ).arg( filename ) );
QMessageBox::critical( this, tr( "Populate output Layer" ), tr( "Can not add features to output layer: %1." ).arg( filename ) );
return;
}

0 comments on commit 8a4d32f

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