diff options
author | Florian Diebold <flodiebold@gmail.com> | 2013-05-06 17:21:31 +0200 |
---|---|---|
committer | Florian Diebold <flodiebold@gmail.com> | 2013-05-06 17:21:31 +0200 |
commit | fac9a833ab5559de67420d33a627c6277196f73f (patch) | |
tree | 9147801045acccaa6a6d37da726514f156689a4b /crawl-ref/source/tileweb.cc | |
parent | fb897f4cdf85abb1616226f6eb97e64d6ac7b0f4 (diff) | |
download | crawl-ref-fac9a833ab5559de67420d33a627c6277196f73f.tar.gz crawl-ref-fac9a833ab5559de67420d33a627c6277196f73f.zip |
Fix a problem with Webtiles formatted_scroller handling.
The webtiles_write_menu call in formatted_scroller::jump_to could
happen before the menu was sent, which would then result in two menus
on the client side. This was revealed by the message combining
changes, because the two menus would both be in the same message and
the second would be ignored by the client before.
Diffstat (limited to 'crawl-ref/source/tileweb.cc')
-rw-r--r-- | crawl-ref/source/tileweb.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/tileweb.cc b/crawl-ref/source/tileweb.cc index a9a66c361e..fc34334ef2 100644 --- a/crawl-ref/source/tileweb.cc +++ b/crawl-ref/source/tileweb.cc @@ -452,7 +452,12 @@ void TilesFramework::push_crt_menu(string tag) bool TilesFramework::is_in_crt_menu() { - return !m_menu_stack.empty() && m_menu_stack.back().menu == NULL; + return is_in_menu(NULL); +} + +bool TilesFramework::is_in_menu(Menu* m) +{ + return !m_menu_stack.empty() && m_menu_stack.back().menu == m; } void TilesFramework::pop_menu() |