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 configuring primary line X/Ys separately #81255

Merged

Conversation

JohnGabrielUK
Copy link
Contributor

@JohnGabrielUK JohnGabrielUK commented Sep 2, 2023

This is an implementation of the feature outlined in this proposal, which at time of writing has yet to be approved.

image

@KoBeWi
Copy link
Member

KoBeWi commented Sep 8, 2023

The implementation looks fine, but there is a concern of compatibility with old values. If someone set primary step values before, they will be lost after this PR.

This code would handle it:

#ifndef DISABLE_DEPRECATED
	if (state.has("primary_grid_steps")) {
		primary_grid_step_x = state["primary_grid_steps"];
		primary_grid_step_y = state["primary_grid_steps"];
	}
#endif

(not sure if DISABLE_DEPRECATED really applies here; maybe a comment would be sufficient. This value won't be needed in the future)

@JohnGabrielUK JohnGabrielUK force-pushed the primary-line-separate-xy branch 2 times, most recently from bcd8842 to 5bb4090 Compare September 9, 2023 12:11
@akien-mga akien-mga modified the milestones: 4.x, 4.2 Sep 12, 2023
@akien-mga akien-mga merged commit 3e68ed0 into godotengine:master Sep 12, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

Allow configuring the primary line x/y components independently for the 2d editor grid snap
5 participants