Fix a nasty bug where pressing 'Alt' to explore the editor menubar would split the window stack in two, rendering the editor unresponsive

This commit is contained in:
Chris Taylor 2012-04-09 17:12:01 +08:00
parent 8a437a759c
commit 285531c4e0
3 changed files with 4 additions and 1 deletions

View file

@ -4,6 +4,7 @@ D1X-Rebirth Changelog
--------
main/state.c: in software rendering scale savestate thumbnail to correct size
editor/autosave.c, editor/info.c, editor/med.c, editor/objpage.c, editor/texpage.c, include/ui.h, ui/keypad.c, ui/uidraw.c: Get the clock, 'keypad' info, texture choosing page and object choosing page to draw (latter two just show black squares for ogl)
arch/sdl/window.c, ui/menubar.c: Fix a nasty bug where pressing 'Alt' to explore the editor menubar would split the window stack in two, rendering the editor unresponsive
20120408
--------

View file

@ -154,6 +154,7 @@ void window_select(window *wind)
if (wind->prev)
wind->prev->next = wind->next;
wind->prev = FrontWindow;
FrontWindow->next = wind;
wind->next = NULL;
FrontWindow = wind;

View file

@ -165,7 +165,8 @@ void menu_hide( MENU * menu )
// Can't hide if it's not already drawn
if (!menu->Displayed) return;
window_set_visible(menu->wind, 0); // don't draw or receive events
if (menu != &Menu[0])
window_set_visible(menu->wind, 0); // don't draw or receive events
menu->Active = 0;
if (Menu[0].wind && menu == &Menu[0])