[QGIS-trac] Re: [Quantum GIS] #1912: [PATCH] area not null for symbols with value zero

Quantum GIS qgis at qgis.org
Thu Dec 17 10:40:33 EST 2009


#1912: [PATCH] area not null for symbols with value zero
-----------------------------------------------------+----------------------
        Reporter:  alicebtoklas                      |         Owner:               
            Type:  bug                               |        Status:  new          
        Priority:  major: does not work as expected  |     Milestone:  Version 1.4.0
       Component:  Symbology                         |       Version:  HEAD         
      Resolution:                                    |      Keywords:  area symbols 
Platform_version:                                    |      Platform:  All          
        Must_fix:  Yes                               |   Status_info:  0            
-----------------------------------------------------+----------------------
Changes (by mlennert):

 * cc: msieczka, homann (added)
  * summary:  area not null for symbols with value zero => [PATCH] area not
              null for symbols with value zero
  * must_fix:  No => Yes

Comment:

 Replying to [ticket:1912 alicebtoklas]:

 > using the "area scale field" to change the size of my point symbols, I
 get small symbols where the value in this field is zero, instead of no
 symbol at all. I think it's a big problem.
 >

 Found the culprit: http://trac.osgeo.org/qgis/changeset/9513, which
 responds to http://trac.osgeo.org/qgis/ticket/1186 (putting Maciek and
 homann in cc, so that they can possibly react as well).

 Applying the following patch, solves the problem of this current bug,
 while apparently not reopening #1186:


 {{{
 Index: qgsmarkercatalogue.cpp
 ===================================================================
 --- qgsmarkercatalogue.cpp      (révision 12502)
 +++ qgsmarkercatalogue.cpp      (copie de travail)
 @@ -118,12 +118,6 @@
    // First prepare the paintdevice that the marker will be drawn onto
    //

 -  // Introduce a minimum size, we don't want it to disappear.
 -  if ( size < 4 )
 -  {
 -    size = 4;
 -  }
 -
    QImage myImage;
    int imageSize;
    if ( fullName.startsWith( "hard:" ) )

 }}}

 As already mentioned, this is a show-stopper for any proportionate symbol
 cartography in QGIS, and so should be solved ASAP.

 I'm also a bit skeptical about the second part of #9513:

 {{{
 -  if ( name == "circle" )
 +  // If radius is 0, draw a circle, so it wont disappear.
 +  if ( name == "circle" || r < 1)
 }}}


 Why does r have to be defined as int ? And is this maybe deprecated since
 http://trac.osgeo.org/qgis/changeset/8976 ? I don't have the time to delve
 any deeper into the source code, but maybe someone can have a look.

 But in any case, most of the issue of this bug seems to be solved by above
 patch.

 Moritz

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1912#comment:5>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list