[Qgis-developer] QGIS Server - GetPrint request does not respect text boxes size and position if dynamic content passed

rldhont rldhont at gmail.com
Mon May 27 13:23:08 PDT 2013


Hi Marco and other devs,

In src/mapserver/qgsconfigparser.cpp:530 we can read :

   //replace label text
   foreach ( QgsComposerLabel *currentLabel, composerLabels )
   {
     QString title = parameterMap.value( currentLabel->id().toUpper() );

     if ( title.isEmpty() )
     {
       //remove exported labels not referenced in the request
       if ( !currentLabel->id().isEmpty() )
       {
         c->removeItem( currentLabel );
         delete currentLabel;
       }
       continue;
     }

     currentLabel->setText( title );
     currentLabel->adjustSizeToText();
   }

This code is used to draw composer label with value defined by the QGIS 
WMS Server Request GetPrint.

The bug defined in the issues #7894 http://hub.qgis.org/issues/7894 is 
probably du to the method adjustSizeToText()
Someone can confim it ?

Question for Marco, Why removed label, if the request doesn't define a 
value ? Why not used the default value ?

Regards,
René-Luc D'Hont
3Liz


More information about the Qgis-developer mailing list