<div dir="ltr"><div><div><div>Radim,<br><br>Thanks for fixing the width issue.<br><br></div>Regarding layers with no titles and the need for treating the space like a layer item, see <a href="http://hub.qgis.org/issues/3605">http://hub.qgis.org/issues/3605</a>. We've discussed this with Marco Hugentobler back then and came up with a nice compromise. <br>
<br>Beyond being a regression as it stands (i.e. legends from 1.8 projects will have visible vertical spacing issues), here's a simple scenario in picture: <a href="http://hub.qgis.org/attachments/3161/legend-simple-scenario.jpg">http://hub.qgis.org/attachments/3161/legend-simple-scenario.jpg</a> (the spacing should be equal for all companies, as well as btween roads and railways.<br>
<br></div>Having no layer title is a way to regroup many layers under one layer name (i.e. having 5 shapefile polygons representing different ago-industrial crops might nicely be represented under one layer title even though the items are in five different physical shapefiles).<br>
<br></div>Math<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 13, 2013 at 5:31 PM, Radim Blazek <span dir="ltr"><<a href="mailto:radim.blazek@gmail.com" target="_blank">radim.blazek@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, Feb 19, 2013 at 4:48 AM, Mathieu Pellerin <<a href="mailto:nirvn.asia@gmail.com">nirvn.asia@gmail.com</a>> wrote:<br>

</div><div class="im">> Radim,<br>
><br>
> Following up on your implementation of the nice legend's multicolumn<br>
> feature. I've noticed two regression (one of which I've filed a bug<br>
> already).<br>
><br>
> 1) The right-side box spacing is now miscalculated as it fails to add the<br>
> icon label space value. Issue 7099 (<a href="http://hub.qgis.org/issues/7099" target="_blank">http://hub.qgis.org/issues/7099</a>) has<br>
> been filed with more details and a accompanying screenshot.<br>
<br>
</div>Fixed.<br>
<div class="im"><br>
> 2) There also was a regression in the way vertical spacing is calculate<br>
> between layer items and layers. An old issue, 3605, highlighted a similar<br>
> visual problem which was fixed in revision 08c88575<br>
> (<a href="http://hub.qgis.org/projects/quantum-gis/repository/revisions/08c885759bd280339605ea07a221ab20f7dfdb75/diff/" target="_blank">http://hub.qgis.org/projects/quantum-gis/repository/revisions/08c885759bd280339605ea07a221ab20f7dfdb75/diff/</a>).<br>

> Long story short, layers with no titles are often used as part of a group of<br>
> layer items. As such, the solution found in the cited revision was to take<br>
> into account the layer item vertical spacing to the layer vertical spacing.<br>
> The multicolumn appear to have regressed this. I can open an issue with<br>
> screenshots if necessary.<br>
<br>
</div>Layers with no titles? Is it a hack to avoid the layer title to be<br>
drawn in the legend for single symbol layers? Wouldn't it be better to<br>
modify composer legend so that single symbol layers will be drawn<br>
without separated layer title above symbol and the layer title text<br>
will be used as the symbol label?<br>
<span class="HOEnZb"><font color="#888888"><br>
Radim<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> Mathieu<br>
><br>
><br>
> On Sun, Nov 18, 2012 at 12:10 AM, Radim Blazek <<a href="mailto:radim.blazek@gmail.com">radim.blazek@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On Wed, Nov 14, 2012 at 11:11 AM, Andreas Neumann <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>><br>
>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > Thanks to Radim we now have multi-column legends in print composer.<br>
>><br>
>> Thanks to Régis and Agence de l'eau Adour as it was already mentioned by<br>
>> others.<br>
>><br>
>> > This<br>
>> > was one of my long-time feature requests - but it never got to the top<br>
>> > of my requests so that we could pay for the work.<br>
>> ><br>
>> > Generally it works great, but I noticed two strange behaviors:<br>
>> ><br>
>> > * when having only one column (default) - the background rectangle is<br>
>> > way too small, not covering the full bouding box of the legend<br>
>><br>
>> Width? Fixed.<br>
>><br>
>> > * when going beyong 4 columns, QGIS gets really slow, hangs or crashes.<br>
>><br>
>> Splitting of layers into columns is not that easy as it seems to be.<br>
>> It is a special sort of bin packing problem (NP-hard). Maybe it has<br>
>> its own name? I have used brute force because:<br>
>>  - I thought that the number of layer will never be too big<br>
>>  - implementaion of heuristic algorithm for such a marginal feature<br>
>> seemed to be overkill<br>
>>  - suboptimal solution could look quite bad<br>
>><br>
>> You proved immediately that I was wrong. How many layers do you have?<br>
>> 70 I have read somewhere? My original idea was to calculate number of<br>
>> possibilities first and decide if heuristic should be used. Now it<br>
>> seems a necessity.<br>
>><br>
>> Maybe I am wrong and there is a simple solution? Well, I did not know<br>
>> at the beginning that I am going to solve combinatorial exercises.<br>
>><br>
>> Regarding the crash, I was quite careful, using value() where there<br>
>> was minimum suspicion that it could run out of range. Many<br>
>> combinations should not mean allocation of a lot of memory, just more<br>
>> computational time. Only one combination is always evaluated at time.<br>
>> Does it seem to be a memory allocation problem or out of list bounds?<br>
>> Could you send me backtrace off list?<br>
>><br>
>> Please follow/comment <a href="http://hub.qgis.org/issues/1841" target="_blank">http://hub.qgis.org/issues/1841</a><br>
>><br>
>> Radim<br>
>><br>
>> > Did other test the new multicolumn legends?<br>
>> ><br>
>> > Thanks Radim for your work!<br>
>> ><br>
>> > Andreas<br>
>> > _______________________________________________<br>
>> > Qgis-developer mailing list<br>
>> > <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
>> > <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>> _______________________________________________<br>
>> Qgis-developer mailing list<br>
>> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>