Skip to content
Permalink
Browse files

make some rendering errors translatable

  • Loading branch information
jef-n committed Aug 20, 2014
1 parent 1cba39d commit a34240d5f9d35c10e9e078a2b9ece8d7cd3a4661
Showing with 5 additions and 5 deletions.
  1. +3 −3 src/core/qgsmaprendererjob.cpp
  2. +2 −2 src/core/qgsvectorlayerrenderer.cpp
@@ -156,7 +156,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin

if ( !ml )
{
mErrors.append( Error( layerId, "Layer not found in registry." ) );
mErrors.append( Error( layerId, tr( "Layer not found in registry." ) ) );
continue;
}

@@ -188,7 +188,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin
QgsDebugMsg( "extent: " + r1.toString() );
if ( !r1.isFinite() || !r2.isFinite() )
{
mErrors.append( Error( layerId, "There was a problem transforming layer's' extent. Layer skipped." ) );
mErrors.append( Error( layerId, tr( "There was a problem transforming the layer's extent. Layer skipped." ) ) );
continue;
}
}
@@ -237,7 +237,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin
mSettings.outputImageFormat() );
if ( mypFlattenedImage->isNull() )
{
mErrors.append( Error( layerId, "Insufficient memory for image " + QString::number( mSettings.outputSize().width() ) + "x" + QString::number( mSettings.outputSize().height() ) ) );
mErrors.append( Error( layerId, tr( "Insufficient memory for image %1x%2" ).arg( mSettings.outputSize().width() ).arg( mSettings.outputSize().height() ) ) );
delete mypFlattenedImage;
layerJobs.removeLast();
continue;
@@ -113,7 +113,7 @@ bool QgsVectorLayerRenderer::render()

if ( !mRendererV2 )
{
mErrors.append( "No renderer for drawing." );
mErrors.append( QObject::tr( "No renderer for drawing." ) );
return false;
}

@@ -146,7 +146,7 @@ bool QgsVectorLayerRenderer::render()
try
{
QgsPoint center = mContext.extent().center();
double rectSize = ct->sourceCrs().geographicFlag() ? 0.0008983 /* ~100/(40075014/360=111319.4833) */ : 100;
double rectSize = ct->sourceCrs().geographicFlag() ? 0.0008983 /* ~100/(40075014/360=111319.4833) */ : 100;

QgsRectangle sourceRect = QgsRectangle( center.x(), center.y(), center.x() + rectSize, center.y() + rectSize );
QgsRectangle targetRect = ct->transform( sourceRect );

0 comments on commit a34240d

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