<div dir="ltr">What's described below is cool, would work out just fine : ) having this alongside groups would work perfectly, probably even better than hack-ish status of the past.<br><br>M<br><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Mar 14, 2013 at 4:05 PM, Régis Haubourg <span dir="ltr"><<a href="mailto:regis.haubourg@eau-adour-garonne.fr" target="_blank">regis.haubourg@eau-adour-garonne.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Hi,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">+1 with Radim. Such hacks do produce inconsistencies and bugs not compatible with collaborative coding. IMHO, we need clean coding in QGIS.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">A feature already asked I remember could solve both issues. Some of us asked that for layers having single symbol style, symbol in legend should
be drawn on the same line as layer’s title (like in Arcgis or mapinfo). <a href="http://hub.qgis.org/issues/6960" rel="nofollow" link="external" target="_blank">http://hub.qgis.org/issues/6960</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Using groups will then help reaching Mathieu’s goal?
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Opinions?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">I’m ready to put that in a contract if needed<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Régis<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De :</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Radim Blazek-2 [via OSGeo.org] [mailto:<a href="mailto:ml-node%2B" target="_blank">ml-node+</a><a href="http://user/SendEmail.jtp?type=node&node=5040290&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>]
<br>
<b>Envoyé :</b> jeudi 14 mars 2013 09:47<br>
<b>À :</b> HAUBOURG<br>
<b>Objet :</b> Re: Multicolumn legends in print composer<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"></p><div>IMO, using empty layer title to achieve grouping of items from
<br>
multiple layers into a single layer (group) is just a workaround. If <br>
it was working for some reason in previous versions (probably because <br>
there was no difference between layer and item spacing) it does not <br>
mean that we must add new and new hacks to the code to support it <br>
forever. <br>
<br>
I am not convinced that removing layer space if the layer title is <br>
empty (<a href="http://hub.qgis.org/projects/quantum-gis/repository/revisions/08c8857/diff/src/core/composer/qgscomposerlegend.cpp" rel="nofollow" link="external" target="_blank">http://hub.qgis.org/projects/quantum-gis/repository/revisions/08c8857/diff/src/core/composer/qgscomposerlegend.cpp</a>)
<br>
is good. It is a hack to support your need but it introduces another <br>
bug and inconsistency because other user may require hidden layer <br>
titles (if empty) but still keeping layer spacing. <br>
<br>
A clean solution could be to add a new group "Road & Railways" with <br>
roads and railways layers inside and implement something like flatten <br>
sublayers check box for the group, which would put items of all <br>
sublayers directly into the group, ignoring layer titles. <br>
<br>
Radim <br>
<br>
<br></div><div>
On Wed, Mar 13, 2013 at 1:30 PM, Mathieu Pellerin <<a href="http://user/SendEmail.jtp?type=node&node=5040281&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:
<u></u><u></u></div><p></p>
<div>
<p class="MsoNormal"></p><div><br>
> Radim, <br>
> <br>
> Thanks for fixing the width issue. <br>
> <br>
> Regarding layers with no titles and the need for treating the space like a <br>
> layer item, see <a href="http://hub.qgis.org/issues/3605" rel="nofollow" link="external" target="_blank">http://hub.qgis.org/issues/3605</a>. We've discussed this with
<br>
> 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 <br>
> have visible vertical spacing issues), here's a simple scenario in picture: <br>
> <a href="http://hub.qgis.org/attachments/3161/legend-simple-scenario.jpg" rel="nofollow" link="external" target="_blank">
http://hub.qgis.org/attachments/3161/legend-simple-scenario.jpg</a> (the spacing <br>
> should be equal for all companies, as well as btween roads and railways. <br>
> <br>
> Having no layer title is a way to regroup many layers under one layer name <br>
> (i.e. having 5 shapefile polygons representing different ago-industrial <br>
> crops might nicely be represented under one layer title even though the <br>
> items are in five different physical shapefiles). <br>
> <br>
> Math <br>
> <br>
> <br></div>
> On Wed, Mar 13, 2013 at 5:31 PM, Radim Blazek <<a href="http://user/SendEmail.jtp?type=node&node=5040281&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>>
<br>
> wrote: <br>
>> <br>
>> On Tue, Feb 19, 2013 at 4:48 AM, Mathieu Pellerin <<a href="http://user/SendEmail.jtp?type=node&node=5040281&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>>
<br><div><div>
>> wrote: <br>
>> > 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 <br>
>> > the <br>
>> > icon label space value. Issue 7099 (<a href="http://hub.qgis.org/issues/7099" rel="nofollow" link="external" target="_blank">http://hub.qgis.org/issues/7099</a>) has
<br>
>> > been filed with more details and a accompanying screenshot. <br>
>> <br>
>> Fixed. <br>
>> <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 <br>
>> > similar <br>
>> > visual problem which was fixed in revision 08c88575 <br>
>> > <br>
>> > (<a href="http://hub.qgis.org/projects/quantum-gis/repository/revisions/08c885759bd280339605ea07a221ab20f7dfdb75/diff/" rel="nofollow" link="external" 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 <br>
>> > group of <br>
>> > layer items. As such, the solution found in the cited revision was to <br>
>> > take <br>
>> > into account the layer item vertical spacing to the layer vertical <br>
>> > spacing. <br>
>> > The multicolumn appear to have regressed this. I can open an issue with <br>
>> > screenshots if necessary. <br>
>> <br>
>> 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>
>> <br>
>> Radim <br>
>> <br>
>> > Mathieu <br>
>> > <br>
>> > <br></div></div>
>> > On Sun, Nov 18, 2012 at 12:10 AM, Radim Blazek <<a href="http://user/SendEmail.jtp?type=node&node=5040281&i=3" rel="nofollow" link="external" target="_blank">[hidden email]</a>>
<br>
>> > wrote: <br>
>> >> <br>
>> >> On Wed, Nov 14, 2012 at 11:11 AM, Andreas Neumann <<a href="http://user/SendEmail.jtp?type=node&node=5040281&i=4" rel="nofollow" link="external" target="_blank">[hidden email]</a>>
<br><div><div>
>> >> 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 <br>
>> >> by <br>
>> >> others. <br>
>> >> <br>
>> >> > This <br>
>> >> > was one of my long-time feature requests - but it never got to the <br>
>> >> > 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 <br>
>> >> > 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" rel="nofollow" link="external" 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></div></div>
>> >> > <a href="http://user/SendEmail.jtp?type=node&node=5040281&i=5" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div>
>> >> > <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="nofollow" link="external" target="_blank">
http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>> >> _______________________________________________ <br>
>> >> Qgis-developer mailing list <br></div>
>> >> <a href="http://user/SendEmail.jtp?type=node&node=5040281&i=6" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>
>> >> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="nofollow" link="external" target="_blank">
http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>> > <br>
>> > <br>
> <br>
> <u></u><u></u><p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">_______________________________________________
<br>
Qgis-developer mailing list <br>
<a href="http://user/SendEmail.jtp?type=node&node=5040281&i=7" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br>
<u></u><u></u></p>
<div class="MsoNormal" style="text-align:center" align="center">
<hr style="color:#cccccc" align="center" noshade size="1" width="100%">
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444">If you reply to this email, your message will be added to the discussion below:<u></u><u></u></span></b></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444"><a href="http://osgeo-org.1560.n6.nabble.com/Multicolumn-legends-in-print-composer-tp5016207p5040281.html" rel="nofollow" link="external" target="_blank">http://osgeo-org.1560.n6.nabble.com/Multicolumn-legends-in-print-composer-tp5016207p5040281.html</a>
<u></u><u></u></span></p>
</div>
<div style="margin-top:4.8pt">
<p class="MsoNormal" style="line-height:18.0pt"><span style="font-size:8.5pt;font-family:"Tahoma","sans-serif";color:#666666">To unsubscribe from Multicolumn legends in print composer,
<a rel="nofollow" link="external">
click here</a>.<br>
<a href="http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" link="external" target="_blank"><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">NAML</span></a>
<u></u><u></u></span></p>
</div>
</div>
<br><hr align="left" width="300">
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/Multicolumn-legends-in-print-composer-tp5016207p5040290.html" target="_blank">RE: Multicolumn legends in print composer</a><div><div>
<br>
Sent from the <a href="http://osgeo-org.1560.n6.nabble.com/Quantum-GIS-Developer-f4099106.html" target="_blank">Quantum GIS - Developer mailing list archive</a> at Nabble.com.<br></div></div><br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">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></blockquote></div><br></div></div></div>