https://issues.qgis.org/https://issues.qgis.org/favicon.ico2012-10-07T01:15:28ZQGIS Issue TrackingQGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=363322012-10-07T01:15:28ZRafael Varela
<ul></ul><p>I repeated the test with a nightly build of QGIS (1.9.0-Master). After updating the <code>.qml</code> file, the style is applied correctly</p> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=363382012-10-07T04:07:54ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>Rafael Varela wrote:</p>
<blockquote>
<p>I repeated the test with a nightly build of QGIS (1.9.0-Master). After updating the <code>.qml</code> file, the style is applied correctly</p>
</blockquote>
<p>so this is fixed in master?</p> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=363672012-10-08T10:44:16ZRafael Varela
<ul><li><strong>File</strong> <a href="/attachments/download/4947/layers.png">layers.png</a> added</li><li><strong>File</strong> <a href="/attachments/download/4948/layer_properties.png">layer_properties.png</a> added</li></ul><p>Giovanni Manghi wrote:</p>
<blockquote>
<p>so this is fixed in master?</p>
</blockquote>
<p>Initially, it seemed to me that it was fixed, but today I repeated the test and the problem is still there.</p>
<p>This time, although, I noticed there's a difference: the style enables both the label taken from the field and the label from the default value simultaneously. If I set the style using the GUI, then the label gets duplicated (the value is the one coming from the field declared in the style).</p>
<p>In the attached screenshot you can see the two labels just after loading the style with the <code>loadNamedStyle</code> function ("desconocido" is the default label value in the style).</p>
<p>I seems that I didn't realize that the extra label was coming from the same layer. Sorry for the misinformation.</p> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=364462012-10-11T07:43:35ZRafael Varela
<ul></ul><p>Well, I realized that in master there are two tabs in the layer properties windows (one of it marked as deprecated), so the extra label was coming from a duplicate label settings in the style definition (although my file was generated by the 1.8 version with only one label setting).</p>
<p>After disabling the deprecated label setting and saving a new style file, now the <code>loadNamedStyle</code> function sets the style correctly.</p> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=386972013-02-08T13:09:09ZMoo Lambdalambda165@gmail.com
<ul></ul><p>I am afraid I am encountering this bug on qgis 1.9 nightly for debian wheezy amd64. Old qml styles made in 1.7 that worked in 1.8 now do not apply the label field. I can understand that, because of the change to the new labeling system. Unfortunately, when I save and then load a style using the new labeling (either .qml or .sld), the label field and other settings are still not applied.</p>
<p>Since 1.9 is definitely for testing, I can understand. Unfortunately, I have so many old styles saved (they don't work, because the old label settings are completely ignored) that even though I can port them over to the new labeling, I can't re-port them over every time I open a project. I hope this is the right bug to report this to; it may also be related to 6222, but I don't know. The line styles and colors seem to work when saving and loading. It's just the label field (new or old labeling) properties that are not being loaded.</p>
<p>The new labeling is really looking good to me, so I hope this can be fixed soon even if it's only for the new labeling.</p> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=431292013-07-14T21:51:27ZJames Stottjamesstott1@gmail.com
<ul><li><strong>Target version</strong> set to <i>Version 2.0.0</i></li></ul><p>I have this problem also. The labels do not get applied to my maps when using a standalone python script using the line:</p>
<p>vLayerName.loadNamedStyle("current_area_style.qml")</p>
<p>QGIS master on Windows 7.</p>
<p>QGIS 1.8 and 1.9 restore the labels correctly from with QGIS, but not via python.</p> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=526352014-06-21T01:54:16ZJürgen Fischerjef@norbit.de
<ul><li><strong>Category</strong> set to <i>Project Loading/Saving</i></li></ul> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=530192014-06-23T01:02:59ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>still true on latest qgis releases?</p> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=537522014-06-28T05:42:33ZJürgen Fischerjef@norbit.de
<ul><li><strong>Target version</strong> changed from <i>Version 2.0.0</i> to <i>Future Release - Lower Priority</i></li></ul> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=570172014-10-30T23:14:52ZJürgen Fischerjef@norbit.de
<ul></ul><p>James Stott wrote:</p>
<blockquote>
<p>I have this problem also. The labels do not get applied to my maps when using a standalone python script using the line:</p>
<p>vLayerName.loadNamedStyle("current_area_style.qml")</p>
<p>QGIS master on Windows 7.</p>
<p>QGIS 1.8 and 1.9 restore the labels correctly from with QGIS, but not via python.</p>
</blockquote>
<p>did you add the layer to the map layer registry before loading the style? After the edit widget refactoring this is a requirement for having the widget restored.</p> QGIS Application - Bug report #6468: loadNamedStyle does not apply labelfieldhttps://issues.qgis.org/issues/6468?journal_id=665352015-12-20T09:15:44ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Resolution</strong> set to <i>worksforme</i></li><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>closing for lack of feedback.</p>