Fix layers property editor last bit value in tooltip#112173
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Nov 12, 2025
Merged
Fix layers property editor last bit value in tooltip#112173Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
kleonc
commented
Oct 29, 2025
| if (renamed_layer_index == INT32_MAX) { | ||
| return; | ||
| } | ||
| ERR_FAIL_INDEX(renamed_layer_index, names.size()); |
Member
Author
There was a problem hiding this comment.
renamed_layer_index should always be valid here, would be a bug if it isn't, hence changed to error.
d14b516 to
8490bca
Compare
8490bca to
c31b92b
Compare
Calinou
approved these changes
Nov 12, 2025
Member
Calinou
left a comment
There was a problem hiding this comment.
Tested locally, it works as expected. Code looks good to me.
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1 << shiftto1u << shiftto not rely on auto casting to unsigned (and to be more explicit). In most cases the change is not really needed as auto casting would happen, but in case of string formatting for the tooltips there was no auto casting to unsigned, hence%dformat string produced a negative value for the last bit.Ctrl/Command+LMBbehavior, added in Replace all flags with one value when holding Ctrl/Cmd in the layers editor #39364 (I suspect not many users are aware of it). It was buggy, as the last bit would be not enabled when disabling some other bit. Fixed this as well.INT32_MAXtoUINT32_MAX, and factored it out toHOVERED_INDEX_NONEconstant. In fact any unsigned value greater than31could be used as such indicator, it was just a little bit puzzling why specificallyINT32_MAX == 0x7FFFFFFFwas used. Givenhovered_indexisuint32_tI think usingUINT32_MAX == 0xFFFFFFFFmakes just a little more sense.