Skip to content
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

Allow selecting TileMapLayers by clicking them #92016

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented May 16, 2024

The new TileMapLayers introduced a workflow problem where selecting a layer for editing is more difficult, depending on scene layout. A common workflow is to put TileMapLayers under a single parent. To select a layer you need to first unfold the parent, which is less convenient. If TileMapLayers are under different parents (and the new system allows for some nice setups), finding the correct layer to edit is even more difficult.

This PR allows selecting a layer by clicking it.

rceUhU87CP.mp4

Although I found a bug 🤔 When you close the bottom editor using shortcut after a layer was selected, it gets glued to the cursor.

godot.windows.editor.dev.x86_64_W0KTw5ZtLV.mp4

@KoBeWi KoBeWi added this to the 4.x milestone May 16, 2024
@KoBeWi KoBeWi requested a review from a team as a code owner May 16, 2024 13:55
Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

This is fine in my opinion, but that cursor thing should be reported and solved separately as it feels unrelated to this PR.

@akien-mga akien-mga requested a review from groud June 24, 2024 09:00
@groud
Copy link
Member

groud commented Jun 28, 2024

Although I found a bug 🤔 When you close the bottom editor using shortcut after a layer was selected, it gets glued to the cursor.

Is this caused by this PR or not ? If not, I think it's good to merge.

@KoBeWi
Copy link
Member Author

KoBeWi commented Jun 28, 2024

Well this PR only adds _edit_is_selected_on_click(), which can't be the source of the bug. Something else is causing it and is only uncovered here.

I think it's some weird corner-case with editor input, where clicking a node starts dragging it, but the editor appears and intercepts the release event.

@akien-mga akien-mga modified the milestones: 4.x, 3.x, 4.3 Jun 28, 2024
@akien-mga akien-mga merged commit d71c85c into godotengine:master Jun 28, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@taedixon
Copy link

Is there any way to disable this behaviour? I find it pretty disruptive to my workflow in the latest beta

@KoBeWi
Copy link
Member Author

KoBeWi commented Jul 17, 2024

no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants