[Commits] [wesnoth/wesnoth] eaa078: initialize wml menu item handlers when they are se...

GitHub noreply at github.com
Mon Jan 5 18:15:53 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: eaa078a86db006887bd4d2d4b9f335560e916248
      https://github.com/wesnoth/wesnoth/commit/eaa078a86db006887bd4d2d4b9f335560e916248
  Author: Chris Beck <render787 at gmail.com>
  Date:   2015-01-05 (Mon, 05 Jan 2015)

  Changed paths:
    M src/game_events/manager.cpp
    M src/game_events/manager.hpp
    M src/game_events/menu_item.cpp
    M src/game_events/menu_item.hpp
    M src/game_events/wmi_container.cpp
    M src/game_events/wmi_container.hpp
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  initialize wml menu item handlers when they are set, not in ctor

this commit causes wml menu items to have their events registered
not during construction but only when "init_handler" is called.
it refactors the wmi_container object to do this when it
constructs new items via the [set_menu_item] path.

this is necessary because the items might be constructed before
the event queue even exists, and we want them to be able to
persist and be reactivated when a new campaign scenario starts.

more testing is necessary to determine if all code paths, including
carryover and reloading, are still working after this commit, and
the earlier commit 6fc1ac1bb224cddec5ccbb7f7865b69b1b093a01

See also discussion of bug #23115.


  Commit: 567f135f1ee8f188eba006f22fe4495621d2dc8e
      https://github.com/wesnoth/wesnoth/commit/567f135f1ee8f188eba006f22fe4495621d2dc8e
  Author: Chris Beck <render787 at gmail.com>
  Date:   2015-01-05 (Mon, 05 Jan 2015)

  Changed paths:
    M src/game_events/manager.cpp
    M src/game_events/manager.hpp
    M src/game_events/menu_item.cpp
    M src/game_events/menu_item.hpp
    M src/game_events/wmi_container.cpp
    M src/game_events/wmi_container.hpp
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  Merge branch 'maybe_fix_23115'


Compare: https://github.com/wesnoth/wesnoth/compare/486fc8ed7189...567f135f1ee8


More information about the Commits mailing list