[FIXED] Chat history in multiplayer lobby isn't displayed

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

[FIXED] Chat history in multiplayer lobby isn't displayed

#1 Post by adrian_broher »

When entering messages into the chat which is part of the multiplayer lobby those messages aren't displayed. After entering around 15 to 20 messages the text slides in message by message from the upper edge of the history box until the first line is displayed. The scrollbar isn't updated properly until the history box is filled.

This behavior can be reproduced on the release-0.4.4 branch. The bug was introduced with commit 7270 but I'm not really sure what could be the cause of this. I would expect that the construction of a CUIMultiEdit with certain dimensions would lead to the same result as the construction of a CUIMultiEdit with 0x0 dimensions and a later call to SizeMove so any pointers would be appreciated.
Last edited by adrian_broher on Fri Aug 01, 2014 11:52 am, edited 2 times in total.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: [BUG] Chat history in multiplayer lobby isn't displayed.

#2 Post by Dilvish »

I just (I think) had a history related problem in single player (while testing the AI aggression level issue) -- I had the game set to 20 AIs and so at the start they were all reporting in their aggression. The first game I hadn't planned ahead to adjust the message box size and moved and resized it while the messages were coming in; I believe I lost the first portion of the history. But, I failed to take a screenshot and I couldn't recreate it, so, not a very valuable bug report in its own right. I thought it might possibly be slightly useful in conjunction with yours though.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Mitten.O
Programmer
Posts: 255
Joined: Sun Apr 06, 2014 4:15 pm

Re: [BUG] Chat history in multiplayer lobby isn't displayed.

#3 Post by Mitten.O »

It seems a MultiEdit with MULTI_TERMINAL_STYLE was so eager to
hide the top instead of the bottom that it hid the top also
when there was no bottom to see.

This simple condition fixes the issue, assuming there is
nothing more going on somewhere else.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

Any code by me in this post is released under GPL 2.0 or later.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: [BUG] Chat history in multiplayer lobby isn't displayed.

#4 Post by adrian_broher »

The patch works for me and the only other place where a MULTI_TERMINAL_STYLE flag is passed to the MultiEditStyle we also pass the desired widget dimensions.

Commited as 7337.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

Post Reply