Skip to content
Permalink
Browse files

qgslayoutitemattributetable.cpp: remove useless nullptr check

  • Loading branch information
rouault committed Jun 1, 2020
1 parent ec3b7b7 commit 25f89c05525869efb18612502f975f4b426dd6d4
Showing with 10 additions and 13 deletions.
  1. +10 −13 src/core/layout/qgslayoutitemattributetable.cpp
@@ -420,20 +420,17 @@ bool QgsLayoutItemAttributeTable::getTableContents( QgsLayoutTableContents &cont
{
visibleRegion = QgsGeometry::fromQPolygonF( mMap->visibleExtentPolygon() );
selectionRect = visibleRegion.boundingBox();
if ( layer )
//transform back to layer CRS
QgsCoordinateTransform coordTransform( layer->crs(), mMap->crs(), mLayout->project() );
try
{
//transform back to layer CRS
QgsCoordinateTransform coordTransform( layer->crs(), mMap->crs(), mLayout->project() );
try
{
selectionRect = coordTransform.transformBoundingBox( selectionRect, QgsCoordinateTransform::ReverseTransform );
visibleRegion.transform( coordTransform, QgsCoordinateTransform::ReverseTransform );
}
catch ( QgsCsException &cse )
{
Q_UNUSED( cse )
return false;
}
selectionRect = coordTransform.transformBoundingBox( selectionRect, QgsCoordinateTransform::ReverseTransform );
visibleRegion.transform( coordTransform, QgsCoordinateTransform::ReverseTransform );
}
catch ( QgsCsException &cse )
{
Q_UNUSED( cse )
return false;
}
visibleMapEngine.reset( QgsGeometry::createGeometryEngine( visibleRegion.constGet() ) );
visibleMapEngine->prepareGeometry();

0 comments on commit 25f89c0

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