summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-11-14 09:31:39 +0000
committertron <tron@openttd.org>2004-11-14 09:31:39 +0000
commit2f56162f35a9326016a768b8deee1cc46afeb541 (patch)
treea0c6c9fb59251f6e4a897330181b96ef77e917ff
parenteb50427670871854931383f8bf331ddaea3ebc45 (diff)
downloadopenttd-2f56162f35a9326016a768b8deee1cc46afeb541.tar.xz
(svn r582) -Fix: [ 1034318 ] place sign and blue message box
A name change wasn't possible while an always-on-top window (like news) has been visible
-rw-r--r--misc_gui.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 89a70790f..007a8c691 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -802,9 +802,13 @@ press_ok:;
if (str_eq(WP(w,querystr_d).buf, WP(w,querystr_d).buf + MAX_QUERYSTR_LEN)) {
DeleteWindow(w);
} else {
- Window *parent = FindWindowById(WP(w,querystr_d).wnd_class, WP(w,querystr_d).wnd_num);
byte *buf = WP(w,querystr_d).buf;
+ WindowClass wnd_class = WP(w,querystr_d).wnd_class;
+ WindowNumber wnd_num = WP(w,querystr_d).wnd_num;
+ Window *parent;
+
DeleteWindow(w);
+ parent = FindWindowById(wnd_class, wnd_num);
if (parent != NULL) {
WindowEvent e;
e.event = WE_ON_EDIT_TEXT;