X Tutup
Skip to content

SpinBox: Add a property to set whether custom_arrow_step rounds value#108335

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
beicause:SpinBox-property-arrow-rounds-value
Nov 18, 2025
Merged

SpinBox: Add a property to set whether custom_arrow_step rounds value#108335
Repiteo merged 1 commit intogodotengine:masterfrom
beicause:SpinBox-property-arrow-rounds-value

Conversation

@beicause
Copy link
Contributor

@beicause beicause commented Jul 6, 2025

Adds a property to set whether custom_arrow_step rounds value, to restore the behavior in 4.3. It is useful to avoid breadking original value when clicking the arrow.

@KoBeWi
Copy link
Member

KoBeWi commented Jul 31, 2025

Isn't this new property the same as setting arrow step to 0, which is the default?
This code doesn't make sense:

	double arrow_step = get_custom_arrow_step() != 0.0 ? get_custom_arrow_step() : get_step();
	if (custom_arrow_round && get_custom_arrow_step() != 0.0) {
...
	} else {
		set_value(get_value() + (p_up ? arrow_step : -arrow_step));

You are checking whether arrow step is not 0, in addition to the new property. The arrow_step in the else block is always equal to step.

@beicause beicause force-pushed the SpinBox-property-arrow-rounds-value branch from 3a63e29 to 892d4c1 Compare July 31, 2025 11:36
@beicause
Copy link
Contributor Author

Isn't this new property the same as setting arrow step to 0, which is the default?

No, see the discussion #108196 (comment)

@beicause beicause force-pushed the SpinBox-property-arrow-rounds-value branch 2 times, most recently from f45bd6a to d9df79a Compare August 27, 2025 16:23
@KoBeWi KoBeWi modified the milestones: 4.x, 4.6 Aug 27, 2025
@Repiteo
Copy link
Contributor

Repiteo commented Oct 28, 2025

Needs rebase

@Repiteo Repiteo force-pushed the SpinBox-property-arrow-rounds-value branch from d9df79a to 7668360 Compare November 18, 2025 18:13
@Repiteo Repiteo merged commit 1e1e9d8 into godotengine:master Nov 18, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 18, 2025

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.

4 participants

X Tutup