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 Effects" dropdown menu of RichTextLabel doesn't work #51735

Closed
Xartorx opened this issue Aug 16, 2021 · 2 comments · Fixed by #52082
Closed

[4.0] "Custom Effects" dropdown menu of RichTextLabel doesn't work #51735

Xartorx opened this issue Aug 16, 2021 · 2 comments · Fixed by #52082

Comments

@Xartorx
Copy link
Contributor

Xartorx commented Aug 16, 2021

Godot version

v4.0.dev.custom_build [203cc6dd3]

System information

Windows 10, 1080 Ti

Issue description

Clicking on "Custom Effects" array item doesn't show (or show very briefly) dropdown menu for RichTextEffect.
Possibly this bug affects other dropdown menus for arrays, but didn't tested it yet.

out.mp4

Steps to reproduce

  1. Add RichTextLabel
  2. Change "Custom Effects" size to 1 (or more)
  3. Click on [empty] dropdown menu

Minimal reproduction project

N/A

@requizm
Copy link
Contributor

requizm commented Aug 17, 2021

I couldn't find the function that works when I click dropdown. I messed around with:
-ArrayPropertyEdit
-EditorPropertyArrayObject
-EditorPropertyArray

@williamd67
Copy link
Contributor

I think that this issue relates to #49817 which refers to #45879. The method get_effects of RichTextLabel returns a copy of the custom effects array (see below). This means that the editor determines that this value changes continuously, which can also be seen be the 'undo' symbol that is shown immediately and when clicked does not seem to do anything (see screenshot).

Vector<Variant> RichTextLabel::get_effects() {
	Vector<Variant> r;
	... 
	return r;
}

Screenshot from 2021-08-22 16-21-45

I will investigate further if the member can be returned in stead of a copy and what the impact of that would be.

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