Bug #5704

Issues with rule based rendering and copy and paste style / qml files

Added by James Stott 12 months ago. Updated 9 months ago.

Status:New Start Date:06/01/2012
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:Symbology
Target version:Version 2.0.0
Platform:Windows Patch supplied:No
Platform version:7 64 bit Affected version:master
Status info: Causes crash or corruption:No
Resolution:

Description

If I copy and paste the style from one layer to another, I get an error stating 'nextFeature() without select()' and the polygons disappear from the map. Whenever I pan or zoom on the map, another error is added to the log messages screen under the postgis tab.

If I save the project and then remove the section shown below from the project in Notepad++, when I reopen the project the polygons display and no errors.

The data is coming from a query that was loaded using the DB Manager plugins SQL window. The base data lives in a PostGIS database.

<customproperties>
<property key="labeling" value="pal"/>
<property key="labeling/addDirectionSymbol" value="false"/>
<property key="labeling/bufferColorB" value="255"/>
<property key="labeling/bufferColorG" value="255"/>
<property key="labeling/bufferColorR" value="255"/>
<property key="labeling/bufferSize" value="1"/>
<property key="labeling/dataDefinedProperty0" value=""/>
<property key="labeling/dataDefinedProperty1" value=""/>
<property key="labeling/dataDefinedProperty10" value="16"/>
<property key="labeling/dataDefinedProperty11" value=""/>
<property key="labeling/dataDefinedProperty12" value=""/>
<property key="labeling/dataDefinedProperty13" value=""/>
<property key="labeling/dataDefinedProperty14" value=""/>
<property key="labeling/dataDefinedProperty2" value=""/>
<property key="labeling/dataDefinedProperty3" value=""/>
<property key="labeling/dataDefinedProperty4" value=""/>
<property key="labeling/dataDefinedProperty5" value=""/>
<property key="labeling/dataDefinedProperty6" value=""/>
<property key="labeling/dataDefinedProperty7" value=""/>
<property key="labeling/dataDefinedProperty8" value=""/>
<property key="labeling/dataDefinedProperty9" value="15"/>
<property key="labeling/decimals" value="0"/>
<property key="labeling/dist" value="0"/>
<property key="labeling/distInMapUnits" value="false"/>
<property key="labeling/enabled" value="true"/>
<property key="labeling/fieldName" value="number"/>
<property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
<property key="labeling/fontItalic" value="false"/>
<property key="labeling/fontSize" value="8.25"/>
<property key="labeling/fontSizeInMapUnits" value="false"/>
<property key="labeling/fontStrikeout" value="false"/>
<property key="labeling/fontUnderline" value="false"/>
<property key="labeling/fontWeight" value="50"/>
<property key="labeling/formatNumbers" value="false"/>
<property key="labeling/isExpression" value="false"/>
<property key="labeling/labelPerPart" value="false"/>
<property key="labeling/mergeLines" value="false"/>
<property key="labeling/minFeatureSize" value="0"/>
<property key="labeling/obstacle" value="true"/>
<property key="labeling/placement" value="1"/>
<property key="labeling/placementFlags" value="0"/>
<property key="labeling/plussign" value="true"/>
<property key="labeling/priority" value="5"/>
<property key="labeling/scaleMax" value="0"/>
<property key="labeling/scaleMin" value="0"/>
<property key="labeling/textColorB" value="0"/>
<property key="labeling/textColorG" value="0"/>
<property key="labeling/textColorR" value="0"/>
<property key="labeling/wrapChar" value=""/>

Not_working_layer_style.txt (11.2 kB) James Stott, 06/06/2012 02:19 am

Working_layer_style.txt (11.2 kB) James Stott, 06/06/2012 02:19 am

History

Updated by Hugo Mercier 12 months ago

Could you, for the two layers, copy the style and paste it in a text file and attach these files here, please ?

Updated by James Stott 12 months ago

The files look exactly the same. The only way I can get the layer that doesnt work to show and get rid of the error messages is to edit the project file manually and then delete the lines shown in my original post.

Updated by Nathan Woodrow 12 months ago

Would be good to get this fixed before 1.8 release.

Updated by Hugo Mercier 12 months ago

I confirm the two files are exactly the same (md5sum are the same).

I tried to import your style on some data, and it works fine.

The part that you were forced to remove belongs to the "old-style" labeling properties (in the Layer menu). But I cannot see where the problem is. The copy/paste style code just calls readSymbology() an writeSymbology() and these two functions correclty process "old style" labelings.

I cannot reproduce. Any chance that the problem comes from your data ? Could we have access to a part of them ?

Updated by Paolo Cavallini 9 months ago

  • Target version set to Version 2.0.0

Also available in: Atom PDF