remove unused parameter from restore_editor_state()

I can't remember what it was for.
This commit is contained in:
2025-06-12 09:49:44 -05:00
parent 74dce15e4c
commit 7b674ffb5c
4 changed files with 9 additions and 9 deletions

View File

@@ -255,7 +255,7 @@ static bool handle_lb_action(int i){
file_to_load = nav_get_scenario();
if(!file_to_load.empty() && load_scenario(file_to_load, scenario)) {
set_pref("LastScenario", file_to_load.string());
restore_editor_state(true);
restore_editor_state();
} else if(!file_to_load.empty())
// If we tried to load but failed, the scenario record is messed up, so boot to start screen.
set_up_start_screen();
@@ -3201,10 +3201,10 @@ bool monst_on_space(location loc,short m_num) {
// Restore the state of the editor when the designer last saved this scenario.
// This state is serialized in scen.fileio.cpp: writeEditorStateToXml()
// and parsed in fileio_scen.cpp: readEditorStateFromXml().
void restore_editor_state(bool first_time) {
set_current_town(scenario.editor_state.last_town_edited, first_time);
set_current_out(scenario.editor_state.last_out_edited, false, first_time);
if(first_time && scenario.editor_state.drawing){
void restore_editor_state() {
set_current_town(scenario.editor_state.last_town_edited, true);
set_current_out(scenario.editor_state.last_out_edited, false, true);
if(scenario.editor_state.drawing){
if(scenario.editor_state.editing_town)
start_town_edit();
else

View File

@@ -4,7 +4,7 @@
#include "scen.undo.hpp"
void handle_close_terrain_view(eScenMode new_mode);
void restore_editor_state(bool first_time = false);
void restore_editor_state();
void init_screen_locs();
void handle_action(location the_point,sf::Event event);
void flash_rect(rectangle to_flash);

View File

@@ -53,7 +53,7 @@ void set_up_apple_events() {
if(load_scenario(fileName, scenario)) {
set_pref("LastScenario", fileName);
restore_editor_state(true);
restore_editor_state();
change_made = false;
ae_loading = true;
}

View File

@@ -331,7 +331,7 @@ static void process_args(int argc, char* argv[]) {
if(!file.empty()) {
if(load_scenario(file, scenario)) {
set_pref("LastScenario", file);
restore_editor_state(true);
restore_editor_state();
change_made = false;
ae_loading = true;
} else {
@@ -481,7 +481,7 @@ void handle_menu_choice(eMenu item_hit) {
file_to_load = item_hit == eMenu::FILE_OPEN ? nav_get_scenario() : scenario.scen_file;
if(!file_to_load.empty() && load_scenario(file_to_load, scenario)) {
set_pref("LastScenario", file_to_load.string());
restore_editor_state(true);
restore_editor_state();
change_made = false;
} else if(!file_to_load.empty())
set_up_start_screen(); // Failed to load file, dump to start