-
Notifications
You must be signed in to change notification settings - Fork 18
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
Features/typo symbol filtering #106
Features/typo symbol filtering #106
Conversation
Co-authored-by: ArmelVidali <vidali.armel@gmail.com>
Co-authored-by: ArmelVidali <vidali.armel@gmail.com>
Co-authored-by: ArmelVidali <vidali.armel@gmail.com>
Co-authored-by: ArmelVidali <vidali.armel@gmail.com>
Hello @robLittiere Thank you very much for this valuable contribution! I glanced at the code and started to try this new feature. Overall it looks good but I noticed a few things:
Could you take care of these two points? |
so it's using generic magrit legend functions Added filtered symbols to project save so we can retreive the information on project load On project load, added logic to display only previously filtered symbols
Co-authored-by: ArmelVidali <vidali.armel@gmail.com>
Hello @mthh Thank you for your quick feedback, indeed, we absolutly forgot about legend and project save/load ! Thank you for bringing this up. What has been done after some time to understand how the project save/load flow work 😄
If other bugs are encountered, please let me know ! |
Thanks, I tested it and most of it seems to work. There is one last detail though before its OK to get merged. The scenario is : the user selects his/her symbols before creating a layer (let's say we use the Brazil layer as in your example, and we deactivate 2 of the 5 categories - see my first screenshot) and then clicks on "confirmation", the window closes. If the user reopens immediately the same symbol selection window, he/she will now only see the selected categories, the others have completely disappeared (see my second screenshot).
|
Thanks for your feedback, finding where to put the correct lines was not easy but it is done ! 👍 Your scenario is correct and is exactly what we imagined, however the issue you pointed is most definitly an unwanted behaviour, we would like at least to be able to check/uncheck all categories again. I'll see what I can do |
We do this so it does not override the first symbols_map which contains all available fields for the category Then changed the naming symbol_map to symbols_to_display in data_manager for legend projection, saving and loading project and reprojecting layers
What has been done in the latest commit : I gathered that we were actually ovewriting the symbol_map that was used to know which symbols should be showed or not. The problem was that Magrit uses this same map in "rendering_params" to let us know which fields are available for a category. In order to fix this, we have two solutions :
Both solutions have the same effect, the first would maybe have been simpler to integrate. Which means I had to modify the naming variables in the legend, save/export/load code for projecting TypoSymbol layers. Instead of using the symbol_map property from the data_manager, we use its symbol_to_display property.
For now, I have left it as default behaviour, when you click on "choose symbols" again, you will get everything checked. |
Thanks a lot ! I will finish to review it and merge it on Monday. |
Alright, thanks for taking the time ! Let us know if there are further changes to make 👍 |
I took the liberty to push to your branch :
I will probably merge it later today. Thanks a lot for your contribution ! |
Hello @mthh I have checked the changes and commits you made. Thank you for fixing the the bugs you found. Indeed, having all those empty images in the DOM was a mistake, thanks for fixing it. Thank you for your feedback, don't hesitate to come back to me or @ArmelVidali (who also contributed) for further improvements 👍 |
I released version 0.14.0 with those changes. It will be made available during the night on https://magrit.cnrs.fr/ server. |
Great ! |
Hello,
We added a functionnality that allows the user to dynamically choose which pictogram they wish to display or to hide by checking a checkbox on the pictogram display menu.
Magrit will then only draw checked pictograms on the layer.
We made it as a quality of life improvement as we sometimes felt like we didnt to display all fields from our data but only selected ones. By default, all fields are selected and thus, we keep magrit's default behaviour
You can see a render exemple in the screenshot below