[Commits] [wesnoth/wesnoth] 80115b: MP Create Game: delegate tab content updates to ga...
GitHub
noreply at github.com
Sat Oct 22 07:51:34 UTC 2016
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 80115b11faa30710f2f43a893da8ec4da5734a9c
https://github.com/wesnoth/wesnoth/commit/80115b11faa30710f2f43a893da8ec4da5734a9c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2016-10-22 (Sat, 22 Oct 2016)
Changed paths:
M src/gui/dialogs/multiplayer/mp_create_game.cpp
M src/gui/dialogs/multiplayer/mp_create_game.hpp
Log Message:
-----------
MP Create Game: delegate tab content updates to game selection
Previously, on_tab_select was called every time update_details was called (including on game selection), as well as
when a tab was manually selected. I had enabled the updating of tab 3 (game settings) on every call to fix an issue
where game settings were incorrect if that tab had not been selected. However, it was recently discovered that the
same issue affected tab 2 (custom options). Since the only time the contents of the tabs change is when called from
update_details anyway (manually selecting a tab did not), it made sense to move the updating code out of on_tab_select.
This is also a performance optimization, since it prevents tabs' contents from being updated every single time a new
one was selected, when in reality there would be no change unless a game was changed. This will also prevent any future
issues of the same ilk and ensures the state of all widget is always in sync with the settings of the selected game.
More information about the Commits
mailing list