Skip to content
Permalink
Browse files

Use bold font in tests + fix a unit test

  • Loading branch information
wonder-sk committed Jun 21, 2017
1 parent f33974e commit 415d3e90a6610a0f04c919a8bc608401cdae0319
@@ -97,7 +97,7 @@ void TestQgsDataDefinedSizeLegend::testBasic()
{
QgsDataDefinedSizeLegend settings;
settings.setLegendType( QgsDataDefinedSizeLegend::LegendCollapsed );
settings.setFont( QgsFontUtils::getStandardTestFont( QStringLiteral( "Roman" ) ) );
settings.setFont( QgsFontUtils::getStandardTestFont( QStringLiteral( "Bold" ) ) );

QList<QgsDataDefinedSizeLegend::SizeClass> classes;
classes << QgsDataDefinedSizeLegend::SizeClass( 3., QString( "3" ) );
@@ -129,7 +129,7 @@ void TestQgsDataDefinedSizeLegend::testCrowded()
{
QgsDataDefinedSizeLegend settings;
settings.setLegendType( QgsDataDefinedSizeLegend::LegendCollapsed );
settings.setFont( QgsFontUtils::getStandardTestFont( QStringLiteral( "Roman" ) ) );
settings.setFont( QgsFontUtils::getStandardTestFont( QStringLiteral( "Bold" ) ) );

QList<QgsDataDefinedSizeLegend::SizeClass> classes;
classes << QgsDataDefinedSizeLegend::SizeClass( 2., QString( "2" ) );
@@ -770,6 +770,7 @@ void TestQgsLegendRenderer::testDataDefinedSizeCollapsed()

QgsDataDefinedSizeLegend *ddsLegend = new QgsDataDefinedSizeLegend();
ddsLegend->setLegendType( QgsDataDefinedSizeLegend::LegendCollapsed );
ddsLegend->setFont( QgsFontUtils::getStandardTestFont( QStringLiteral( "Bold" ) ) );

QgsSingleSymbolRenderer *r = new QgsSingleSymbolRenderer( symbol ); // takes ownership
r->setDataDefinedSizeLegend( ddsLegend );
@@ -2249,7 +2249,6 @@ def testClone(self):

diag_renderer = QgsSingleCategoryDiagramRenderer()
diag_renderer.setAttributeLegend(False) # true by default
diag_renderer.setSizeLegend(True) # false by default
layer.setDiagramRenderer(diag_renderer)

diag_settings = QgsDiagramLayerSettings()

0 comments on commit 415d3e9

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