gui: Display EPSG codes in tooltips for Data Catalog locations#7427
gui: Display EPSG codes in tooltips for Data Catalog locations#7427polucifier wants to merge 1 commit into
Conversation
|
Would it be possible to make this optional? I can see why this is possibly handy, but for me it would add clutter. |
|
Could it show up in the tooltip if it already doesn’t do it normally? |
|
Having it optional, enable per project would avoid having to do these calls only for the GUI, (slowing down the initial loading). Similar to how the number of features of a layer isn’t systematically counted and displayed in QGIS, you have to enable it for the layer if wanted. |
- Implemented OnItemToolTip to display the project's EPSG code upon hovering. - Used tree model search to resolve the node from item text, ensuring compatibility with the virtual tree structure. - Cached EPSG code in node data to avoid repeated shell calls and preserve performance.
26e6593 to
f400716
Compare
I feel like having this in a tooltip is more convenient and expected than calling "show projection info" from the context menu for each location or changing the current mapset to see the CRS in the status bar. It provides instant, zero-click access to the EPSG code just by hovering, which is faster when browsing through multiple projects. If you think this alternative UX isn't needed, let me know and I will gladly close this PR. Thanks! |
Description
This PR enhances the Data Catalog tree view by providing immediate spatial context to users. It displays the EPSG code via a native tooltip when hovering over a georeferenced project (location).
Technical Details
g.proj -ginside a temporary isolated environment (gs.create_environment).data["epsg"]), ensuring that tree sorting and filtering remain instantaneous.Nonefor unreferenced locations (likeXY), rendering them without any extra markup.wx.EVT_TREE_ITEM_GETTOOLTIPevent. This ensures the heavyg.projcall only happens when the user actively hovers over a location, preventing any latency during application startup or tree initialization.How to Test
Visuals