Fix bug where permanent inventory window would go away after
any operation that used the inventory window to pick items. Since
we were hiding the permanent inventory window, this would also
leave a space filled with white, creating jarring visual if
using dark themed window backgrounds.
data->is_active = FALSE;
LayoutMenu(hWnd); // hide dialog buttons
mswin_popup_destroy(hWnd);
+
+ /* If we just used the permanent inventory window to pick something,
+ * set the menu back to its display inventory state.
+ */
+ if (flags.perm_invent && mswin_winid_from_handle(hWnd) == WIN_INVEN
+ && how != PICK_NONE) {
+ data->menu.prompt[0] = '\0';
+ SetMenuListType(hWnd, PICK_NONE);
+ LayoutMenu(hWnd);
+ }
}
+
return ret_val;
}
/*-----------------------------------------------------------------------------*/
}
DrawMenuBar(GetNHApp()->hMainWnd);
- ShowWindow(hWnd, SW_HIDE);
+ /* Don't hide the permanent inventory window ... leave it showing */
+ if (!flags.perm_invent || mswin_winid_from_handle(hWnd) != WIN_INVEN)
+ ShowWindow(hWnd, SW_HIDE);
+
GetNHApp()->hPopupWnd = NULL;
mswin_layout_main_window(hWnd);