-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX][Server] In GetPrint, legend as to be fixed when it is not auto update or filter by map #7232
[BUGFIX][Server] In GetPrint, legend as to be fixed when it is not auto update or filter by map #7232
Conversation
@gioman I think this PR will interested you. |
@rldhont thanks! yes, I was vocal about this regression, but I don't think I was the only one affected. To be sure: does this re-introduce a way to select "none" as map object for a specific legend in the map composer? or us fixes the "?" showing when doing the GetPrint requests? |
If you uncheck auto-update, the legend becomes fix like when you select "none" as map. |
@rldhont that's the problem: "none" as option has been removed without any previous discussion in one of the first point releases of 2.18 |
none is not the problem, because, the legend is only filter by map if check the options. In the other case, the map context is not used. |
@rldhont I'm not sure if I'm understanding but I'll give it a try with the patch and let you know. Thanks again. |
I have try the option auto-update and filterByMap and only filterByMap using the linked map. But it's probably an other issue. |
Trying to compile to test the patch. |
This probably fixed this issue https://issues.qgis.org/issues/16899 |
@rldhont I tested your patch. I was mistaken when I said (i.e. on Redmine) that the "none" value (for the "map" option in the legend properties of the map composer) was removed sometime at the beginning of the the 2.18 cycle, in fact I compiled also 2.18.0 and the option isn't there. But compiling 2.18.0 was useful because it allowed me to understand that the problem (or "a" problem) also lies how the project were saved in early 2.18 releases and how they are in later ones. To make things more clear I used LM to create the GetPrint requests and the Montpellier demo project with only the "Quartiers" and "Buildings" layers active (all the others not active). All layouts where tested with the "auto-update" option of the legend disabled.
a) with "filter legend by map content" OFF b) with "filter legend by map content" ON c) and even with "filter legend by map content" OFF and map=none, by manually editing the project file as this option is not available anymore in the GUI. This is the "fixed" legend I'm speaking about, and manually editing the project file (to tweak the legend object) is the only way to get again this in GetPrint with QGIS 2.18
b) with "filter legend by map content" ON is different from the above one, and it actually seems to show a "fixed legend" behavior, which in my opinion is not correct in this case (if the filter for legend is on it should really show only the layers visible on map): with results for a) and c) identical to the ones in the first scenario
while for a) and c) are equals and show the "?" behavior |
@rldhont I also applied this patch, and for a project saved and served with 2.18.20 (with the patches) I don't see any difference from my previous report: with "filter legend by map content" ON result is ok, without the "?" are shown and there no option to select "none" as value for the legend "map" configuration (but even editing the project manually the result is still wrong with the "?"). Thanks for tackling this. |
…to update or filter by map In release-2_14, a legend is fixed when it is not linked to a map. In release-2_18, a legend as to be fixed when it is not auto update or filter by map. Actually a legend with no auto update and a layer missing in the request, the missing layer is repalced by `(?)` It's fixed a regression in some. To fix this regression, layers needed in legen composer has to be loaded before the composer items has been parsed.
8709ab0
to
e991380
Compare
@gioman I have found why we have I update my commit to fix it. Now I have to fix the "auto-update" option of the legend enabled. Actually the legend is empty! |
Description
In release-2_14, a legend is fixed when it is not linked to a map. In
release-2_18, a leganed as to be fixed when it is not auto update or filter
by map.
Actually a legend with no auto update and a layer missing in the request, the
missing layer is repalced by
(?)
It's fixed a regression in some.
Checklist
scripts/prepare-commit.sh
script before each commit