Fix test compile errors
This commit is contained in:
@@ -2866,6 +2866,7 @@ bool save_check(std::string which_dlog, bool allow_no) {
|
|||||||
return false;
|
return false;
|
||||||
change_made = false;
|
change_made = false;
|
||||||
town->set_up_lights();
|
town->set_up_lights();
|
||||||
|
store_current_terrain_state();
|
||||||
save_scenario();
|
save_scenario();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -1080,9 +1080,7 @@ struct overrides_sheet {
|
|||||||
|
|
||||||
extern std::string scenario_temp_dir_name;
|
extern std::string scenario_temp_dir_name;
|
||||||
extern fs::path scenDir;
|
extern fs::path scenDir;
|
||||||
extern void store_current_terrain_state();
|
|
||||||
void save_scenario(bool rename) {
|
void save_scenario(bool rename) {
|
||||||
store_current_terrain_state();
|
|
||||||
fs::path toFile = scenario.scen_file;
|
fs::path toFile = scenario.scen_file;
|
||||||
if(rename || toFile.empty()) {
|
if(rename || toFile.empty()) {
|
||||||
fs::path def = scenario.scen_file;
|
fs::path def = scenario.scen_file;
|
||||||
|
@@ -456,9 +456,11 @@ void handle_menu_choice(eMenu item_hit) {
|
|||||||
update_edit_menu();
|
update_edit_menu();
|
||||||
break;
|
break;
|
||||||
case eMenu::FILE_SAVE:
|
case eMenu::FILE_SAVE:
|
||||||
|
store_current_terrain_state();
|
||||||
save_scenario();
|
save_scenario();
|
||||||
break;
|
break;
|
||||||
case eMenu::FILE_SAVE_AS:
|
case eMenu::FILE_SAVE_AS:
|
||||||
|
store_current_terrain_state();
|
||||||
save_scenario(true);
|
save_scenario(true);
|
||||||
break;
|
break;
|
||||||
case eMenu::FILE_NEW:
|
case eMenu::FILE_NEW:
|
||||||
|
@@ -184,8 +184,8 @@ TEST_CASE("Loading a new-format scenario record") {
|
|||||||
CHECK(scen.out_sec_start == loc(1,3));
|
CHECK(scen.out_sec_start == loc(1,3));
|
||||||
CHECK(scen.out_start == loc(12,21));
|
CHECK(scen.out_start == loc(12,21));
|
||||||
CHECK(scen.default_ground == 2);
|
CHECK(scen.default_ground == 2);
|
||||||
CHECK(scen.last_out_edited == loc(0,0));
|
CHECK(scen.editor_state.last_out_edited == loc(0,0));
|
||||||
CHECK(scen.last_town_edited == 0);
|
CHECK(scen.editor_state.last_town_edited == 0);
|
||||||
CHECK(scen.init_spec == -1);
|
CHECK(scen.init_spec == -1);
|
||||||
}
|
}
|
||||||
SECTION("With a different icon in the intro dialog") {
|
SECTION("With a different icon in the intro dialog") {
|
||||||
|
Reference in New Issue
Block a user