From cc786bada63bf65dc60f214da3d5c9d7ca9ee449 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 25 Apr 2017 10:57:55 +0300 Subject: [PATCH] Fixed crash when mouse is moved right after saving of game has been triggered https://forum.zdoom.org/viewtopic.php?t=56060 https://forum.zdoom.org/viewtopic.php?t=49369&start=105#p992821 https://forum.drdteam.org/viewtopic.php?t=7607 --- wadsrc/static/zscript/menu/loadsavemenu.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/wadsrc/static/zscript/menu/loadsavemenu.txt b/wadsrc/static/zscript/menu/loadsavemenu.txt index 7fe35431731..279024a58a6 100644 --- a/wadsrc/static/zscript/menu/loadsavemenu.txt +++ b/wadsrc/static/zscript/menu/loadsavemenu.txt @@ -500,6 +500,24 @@ class SaveMenu : LoadSaveMenu // //============================================================================= + override bool MouseEvent(int type, int x, int y) + { + if (mSaveName.Length() > 0) + { + // Do not process events when saving is in progress to avoid update of the current index, + // i.e. Selected member variable must remain unchanged + return true; + } + + return Super.MouseEvent(type, x, y); + } + + //============================================================================= + // + // + // + //============================================================================= + override bool OnUIEvent(UIEvent ev) { if (ev.Type == UIEvent.Type_KeyDown)