Use valid extent in testRegisterFeatureUnprojectible

The test was meant to catch a crasher upon being unable to project
a feature. Today it looks like QGIS is able to project the feature
and generate a label for it, but the test still reports no features
being added only because the "visible extent" (set to the map)
is empty.
This commit is contained in:
Sandro Santilli 2023-10-21 12:31:01 +02:00 committed by Nyall Dawson
parent 3d217188bc
commit 9a543632df

View File

@ -938,9 +938,8 @@ void TestQgsLabelingEngine::testRegisterFeatureUnprojectible()
QgsCoordinateReferenceSystem tgtCrs;
tgtCrs.createFromString( QStringLiteral( "EPSG:3857" ) );
mapSettings.setDestinationCrs( tgtCrs );
mapSettings.setOutputSize( size );
mapSettings.setExtent( vl2->extent() );
mapSettings.setExtent( tgtCrs.bounds() );
mapSettings.setLayers( QList<QgsMapLayer *>() << vl2.get() );
mapSettings.setOutputDpi( 96 );
QgsRenderContext context = QgsRenderContext::fromMapSettings( mapSettings );