Skip to content

wxGUI/datacatalog: Fix pasting several maps - #8318

Open
saket0187 wants to merge 2 commits into
OSGeo:mainfrom
saket0187:datacatalog-paste-multiple
Open

saket0187 wants to merge 2 commits into
OSGeo:mainfrom
saket0187:datacatalog-paste-multiple

Conversation

@saket0187

Copy link
Copy Markdown
Contributor

Fix Data Catalog paste of several maps: a skipped map no longer stops the rest, same-named maps reprojected into one mapset get a rename prompt, failed copies stay marked, and temporary files and dialogs are cleaned up.

Same project and mapset are now compared by path, so pasting after filtering no longer runs r.proj.

@petrasovaa petrasovaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was prepared with the help of Claude (AI assistant).

dlg.Destroy()
if not reprojecting:
return False
reprojected.add((self.copy_layer[i].data["type"], new_name.lower()))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comparing with lowercase?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS and Windows file systems are case-insensitive by default, so r1 and R1 are the same map there. Without .lower(), a second map renamed to R1 in the same paste is accepted if the reprojection to r1 hasn't finished yet, and its r.proj then fails with " exists" (tested on macOS).

@github-actions github-actions Bot added GUI wxGUI related Python Related code is in Python labels Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GUI wxGUI related Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants