[QGIS-trac] Re: [Quantum GIS] #1162: missing possibility to use QML Style for more than one layer

Quantum GIS qgis at qgis.org
Mon Sep 1 04:53:19 EDT 2008


#1162: missing possibility to use QML Style for more than one layer
--------------------------------------------------------------+-------------
        Reporter:  bjpfei                                     |         Owner:  nobody       
            Type:  bug                                        |        Status:  new          
        Priority:  critical: causes crash or data corruption  |     Milestone:  Version 1.0.0
       Component:  Symbology                                  |       Version:  HEAD         
      Resolution:                                             |      Keywords:               
Platform_version:                                             |      Platform:  All          
        Must_fix:  Yes                                        |   Status_info:  1            
--------------------------------------------------------------+-------------
Comment (by hdus):

 Replying to [comment:2 timlinux]:
 > Can you confirm if this bug is still an issue using svn trunk? For me it
 works fine in svn trunk.
 >
 > Regarding the field number instead of field name issue, you should file
 a separate bug for that since its a 'feature' of how layer properties are
 serialised - qml files make use of the standard QGIS serialisation
 routines to do their thing.
 >
 > Regards
 >
 > Tim

 The fix looks to be half done.

 1. Load a polygon layer with community borders. [[BR]]
 2. Create and save a unique values style QML based on community
 names.[[BR]]
 3. Load an other layer containing an attribute community names. [[BR]]
 4. Load the prior defined QML to the new layer. [[BR]]
 5. The legend name of the new layer is changed to the name of the first
 layer. [[BR]]
 6. Classification in map canvas is performed correctly but the legend is
 not updated.[[BR]]
 7. Toggle the visibility of the new layer off and on, the layer disappears
 from map canvas.[[BR]]

 What could be a way to handle this issue? Perhaps a solution could be as
 follows:

 When I load a QML Style to a layer QGIS have to check whether this QML is
 associated to the layer or not. This information is known from the
 connection parameters. If the layer is not associated don't change the
 layer name and ask the user to choose an appropriate attribute of the
 given attributes. The user is responsible for the correctness of the
 choosen attribute. Maybe this could be an appropriate approach?

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1162#comment:3>
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