From 9a543632dfa24acf9cc08c4cdbc63e4e7b5c2cff Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Sat, 21 Oct 2023 12:31:01 +0200 Subject: [PATCH] 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. --- tests/src/core/testqgslabelingengine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/src/core/testqgslabelingengine.cpp b/tests/src/core/testqgslabelingengine.cpp index f1eeeb5019a..3d32075d1d6 100644 --- a/tests/src/core/testqgslabelingengine.cpp +++ b/tests/src/core/testqgslabelingengine.cpp @@ -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() << vl2.get() ); mapSettings.setOutputDpi( 96 ); QgsRenderContext context = QgsRenderContext::fromMapSettings( mapSettings );