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

4.0 Custom Project Settings with feature tags are displayed incorrectly #60352

Closed
Lielay9 opened this issue Apr 18, 2022 · 5 comments · Fixed by #60363
Closed

4.0 Custom Project Settings with feature tags are displayed incorrectly #60352

Lielay9 opened this issue Apr 18, 2022 · 5 comments · Fixed by #60363

Comments

@Lielay9
Copy link
Contributor

Lielay9 commented Apr 18, 2022

Godot version

4.0alpha6

System information

Windows 10 Vulkan, Nvidia 1050TI (Reproduced on desktop 2080TI)

Issue description

Expected:

Expected

Got:

Got

Names are only displayed incorrectly; the project.godot-file has correct names, the tooltips use correct paths and the settings can be referred from the expected paths from code. Based on a quick test it seems that all tags produce similar results depending on their length.

Also a relevant comment from @Calinou:

This is likely a regression from godotengine/godot#58706 ... I've been able to reproduce this too but I don't know exactly why it's broken.

Also also. When trying to reproduce this bug, I found out that the reset-icons next to the custom project settings don't reset the value to the default variable value but instead delete the setting altogether. (In 3.x there are no reset-icons). If not linked to this issue, then perhaps another bug.

Steps to reproduce

Add a custom project setting that has a feature tag. (.windows, .android etc.)

Minimal reproduction project

No response

@Calinou Calinou added this to the 4.0 milestone Apr 18, 2022
@Calinou
Copy link
Member

Calinou commented Apr 18, 2022

cc @timothyqiu

@Rindbee
Copy link
Contributor

Rindbee commented Apr 18, 2022

May be related to the code here.

// Get the property label's string.
String name_override = (path.contains("/")) ? path.substr(path.rfind("/") + 1) : path;
String feature_tag;
{
const int dot = name_override.find(".");
if (dot != -1) {
feature_tag = name_override.right(dot);
name_override = name_override.substr(0, dot);
}
}

feature_tag = name_override.right(dot); 

Here should be the substring to the right of the "."

@timothyqiu
Copy link
Member

@Rindbee Yeah, the behavior of right() changed on master. This is a cherry-pick mistake I made :(

@Rindbee
Copy link
Contributor

Rindbee commented Apr 19, 2022

Darkening of the labels also seems to be an issue.

@timothyqiu
Copy link
Member

timothyqiu commented Apr 19, 2022

The label is darkened when it's an override. When the dot is lost (due to the right() mistake), it's not darkened.

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

Successfully merging a pull request may close this issue.

4 participants