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

Disable lock and group buttons when selected item is not CanvasItem #88997

Merged
1 commit merged into from
Mar 24, 2024

Conversation

jsjtxietian
Copy link
Contributor

@jsjtxietian jsjtxietian commented Feb 29, 2024

An idea of fix #88939 , should be merged after #89132 is merged.

The origin problem lies in the fact that ParallaxBackground is not a CanvasItem so the code did not do anything special to it, I guess if this need to be fixed, we can either hide the button or make it disable.

This pr disables lock and group buttons when there's not any selected CanvasItem.

@Mickeon
Copy link
Contributor

Mickeon commented Feb 29, 2024

So what about Node3Ds?

@KoBeWi
Copy link
Member

KoBeWi commented Feb 29, 2024

While the report was only about 2D editor, the 3D one needs the same treatment, even for consistency.

@jsjtxietian
Copy link
Contributor Author

I've rebased the code onto master, and added back _update_lock_and_group_button in _draw_viewport, to support update the lock button immediately after click it instead of next selection_changed.

@KoBeWi
Copy link
Member

KoBeWi commented Mar 6, 2024

When you click non-CanvasItem node, the lock button opens:

godot.windows.editor.dev.x86_64_aaHzgY3HQv.mp4

It's inconsistent with empty selection, which is closed, and also suggests that non-CanvasItems are "locked". Probably worth fixing. It can be done with all_locked = all_locked && has_canvas_item.

EDIT:
Same in 3D.

akien-mga added a commit that referenced this pull request Mar 24, 2024
Disable lock and group buttons when selected item is not CanvasItem
@akien-mga akien-mga closed this pull request by merging all changes into godotengine:master in 06abc86 Mar 24, 2024
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian jsjtxietian deleted the parallax branch March 24, 2024 15:29
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.

Cannot lock or group child nodes of ParallaxBackground
5 participants