wxGUI/history: Display saved region name if stored#7095
wxGUI/history: Display saved region name if stored#7095saket0187 wants to merge 2 commits intoOSGeo:mainfrom
Conversation
wenzeslaus
left a comment
There was a problem hiding this comment.
The comparison needs more reasoning (epsilon, 3D, ...). Similarly, please describe behavior for the different situations.
As for the details here, user may still want to update to the named (saved) region. The GUI element alignment is wrong.
|
Thank you for the review. Just wanted to clarify few things before making commit.
I assume this means I should compare all other values like 3d items. right?
Can you explain this a little more what do you mean here if you don't mind. |
|
Yes, you should also compare the values for 3D. |
|
I know there are still some changes needed, but I wanted to check if I’m heading in the right direction or just overcomplicating things. Currently, I also switched to format="shell" instead of JSON because the JSON output was returning verbose keys like "north" instead of short keys like "n", which simplifies parsing. Additionally, I added translation keys for the new 3D fields, although these can be removed if not needed. From what I could find , when region 3D values aren’t present, they are set to defaults automatically, so converting from a 2D region to 3D will provide reasonable default values right? |
This PR adds the feature referred in #5283
Here are the outputs:
MAPSET/windowsMAPSET/windowsAdded two new methods to support region name display:
_get_saved_region_name(): Searches MAPSET/windows for matching saved regions_compare_regions(): Compares regions with epsilon tolerance for floating-point precisionThese methods are separate from the existing region match logic to avoid modifying
working functionality and keep changes minimal and isolated.
Let me know if this needs any changes.