Skip to content

Commit

Permalink
Call loadLabelSettings in initializeRender method and enable in sldpa…
Browse files Browse the repository at this point in the history
…rser
  • Loading branch information
mhugent committed Jun 11, 2014
1 parent 1bab141 commit dedc662
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
13 changes: 9 additions & 4 deletions src/mapserver/qgssldconfigparser.cpp
Expand Up @@ -528,15 +528,20 @@ bool QgsSLDConfigParser::featureInfoFormatSIA2045() const
return false;
}

void QgsSLDConfigParser::drawOverlays( QPainter *, int , int, int ) const
void QgsSLDConfigParser::drawOverlays( QPainter* p, int dpi, int width, int height ) const
{
//todo: fixme
if ( mFallbackParser )
{
mFallbackParser->drawOverlays( p, dpi, width, height );
}
}

void QgsSLDConfigParser::loadLabelSettings( QgsLabelingEngineInterface * lbl ) const
{
Q_UNUSED ( lbl );
//needs to be here?
if ( mFallbackParser )
{
mFallbackParser->loadLabelSettings( lbl );
}
}

QString QgsSLDConfigParser::serviceUrl() const
Expand Down
11 changes: 6 additions & 5 deletions src/mapserver/qgswmsserver.cpp
Expand Up @@ -999,11 +999,6 @@ QImage* QgsWMSServer::getMap()

applyOpacities( layersList, bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies );

if ( mConfigParser )
{
mConfigParser->loadLabelSettings( mMapRenderer->labelingEngine() );
}

mMapRenderer->render( &thePainter );
if ( mConfigParser )
{
Expand Down Expand Up @@ -1390,6 +1385,12 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList&
#endif
mMapRenderer->setLayerSet( layerIdList );

//load label settings
if ( mConfigParser )
{
mConfigParser->loadLabelSettings( mMapRenderer->labelingEngine() );
}

return theImage;
}

Expand Down

0 comments on commit dedc662

Please sign in to comment.