fix game crashing when showing a too large tooltip
previously the game would go into an infinite loop at
https://github.com/wesnoth/wesnoth/blob/1.14.4/src/gui/widgets/window.cpp#L1046
when a tooltip doesn't fit on screen, this could in particular happen in
the mp lobby when hovering over the 'i' of a game that uses a ridiculous
amount of modifications.
I currently don't see any case where the game is actually able to 'fix'
a bad height that was reported from reevaluate_best_size. so i just
disable reevaluate_best_size for floating tooltips.
If there exists such a case, an alternative fix could be to change the
reevaluate loop in window::layout to also stop when a new iteration
returned the same size as the previous iteration.
(cherry-picked from commit 936516c83b
)
This commit is contained in:
parent
d3d7e8f297
commit
66c0753000
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ def set_w(r, w, s)
|
|||
def reevaluate_best_size(w, s)
|
||||
(
|
||||
[
|
||||
w.y > s.y,
|
||||
0,
|
||||
#
|
||||
debug_print('window ', w),
|
||||
debug_print('screen ', s)
|
||||
|
|
Loading…
Add table
Reference in a new issue