Merge pull request #800 from Wedge009/bug_25093_fix
Resolve sides in editor not having a proper side number (bug #25093)
This commit is contained in:
commit
99a713c5e3
3 changed files with 9 additions and 4 deletions
|
@ -166,6 +166,8 @@ Version 1.13.5+dev:
|
|||
player opened and closed a menu.
|
||||
* Correct unit recall count in statistics when undoing a unit recall (bug #25060)
|
||||
* Add tip to recall units instead of recruiting them if costs exceed 20 gold (recruitment costs)
|
||||
* Resolve sides in map editor not having a proper side number and subsequently
|
||||
causing a crash upon editing (bug #25093)
|
||||
|
||||
Version 1.13.5:
|
||||
* Campaigns:
|
||||
|
|
|
@ -207,15 +207,18 @@ void context_manager::load_mru_item(unsigned int index, bool force_same_context
|
|||
load_map(mru[index], !force_same_context);
|
||||
}
|
||||
|
||||
void context_manager::edit_side_dialog(int side)
|
||||
void context_manager::edit_side_dialog(int side_index)
|
||||
{
|
||||
team& t = get_map_context().get_teams()[side];
|
||||
team& t = get_map_context().get_teams()[side_index];
|
||||
|
||||
//TODO
|
||||
//t.support()
|
||||
|
||||
editor_team_info team_info(t);
|
||||
|
||||
// The side number perhaps should have been set in map_context::new_side() but the design of team::team_info appears to be read-only.
|
||||
team_info.side = side_index + 1; // note team_info::side is supposed to be 1 to n, while side/team indexes are 0 to n-1
|
||||
|
||||
if(gui2::teditor_edit_side::execute(team_info, gui_.video())) {
|
||||
get_map_context().set_side_setup(team_info);
|
||||
}
|
||||
|
|
|
@ -133,8 +133,8 @@ public:
|
|||
/** Display a scenario edit dialog and process user input. */
|
||||
void edit_scenario_dialog();
|
||||
|
||||
/** TODO */
|
||||
void edit_side_dialog(int side);
|
||||
/** Display a side edit dialog and process user input. */
|
||||
void edit_side_dialog(int side_index);
|
||||
|
||||
/** Display a new map dialog and process user input. */
|
||||
void new_map_dialog();
|
||||
|
|
Loading…
Add table
Reference in a new issue