-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Printed messages don't get grouped #49030
Comments
Duuuuude what is going on with this stuff. It is 100% to do with the fact that when grouping messages the steps are 1) remove the last line on the RichTextLabel; and 2) add the text back with the count incremented. The first step is where the issue lies... RTLs don't like that step... Should I just redraw the entire log every time... |
I blame it on RichTextLabel... from my testing it seems pretty broken and the internals are very convoluted so I have no idea how to fix. Put this script on a RichTextLabel node in a new scene... extends RichTextLabel
func _ready():
text = "test1\ntest2\ntest3\ntest4\ntest5\ntest6"
func _input(event):
if event is InputEventKey:
if event.keycode == KEY_SPACE and not event.echo and event.pressed:
print("---------")
print("before count: " + str(get_line_count()))
remove_line(get_line_count() - 1)
print("after count: " + str(get_line_count())) Press space a bunch of times. Expectation: one line is removed at a time until none are left. Reality: No lines are removed until you press it 5 times, at which point the last 3 lines are removed at once. However, in the console, note that internally it thinks it has removed lines, but then after the 5th press it goes to reporting the number of lines before and after the Perhaps I was doomed from the start if RichTextLabel is not working properly. |
For now maybe "collapsing" should be removed. It seems to be having a lot of troubles. |
…orLog. There were some issues in RichTextLabel `remove_line()` method, where items were not correctly removed, and line decremending for items in later lines was not correctly done. This also fixed several headaches with EditorLog, which relied on the `remove_line()` method for collapsing of duplicate messages. The fix to RTL also fixed the issues with EditorLog. Fixes godotengine#49030
Godot version:
d9d920e
Issue description:
I also seen a case where messages were correct when using
print_line()
from C++, but then an error was printed and grouping broke.CC @EricEzaM ;)
The text was updated successfully, but these errors were encountered: