Widgets: Unschedule timeouts on early close (#11126)

Affects Notification, InfoMessage & QRMessage

Includes a drive-by fix for Trapper interactions that have been broken for... a long while ;).
This commit is contained in:
NiLuJe
2023-11-22 18:58:31 +01:00
committed by GitHub
parent bc7ea8602e
commit bba48fc1bf
4 changed files with 53 additions and 27 deletions

View File

@@ -179,8 +179,10 @@ function Trapper:info(text, fast_refresh)
return false
end
if self.current_widget then
-- Re-show current widget that was dismissed
-- (this is fine for our simple InfoMessage)
-- Resurect a dead widget. This should only be performed by trained Necromancers.
-- Do NOT do this at home, kids.
-- Some state *might* be lost, but the basics should survive...
self.current_widget:init()
UIManager:show(self.current_widget)
end
UIManager:forceRePaint()