non-mac targets scenario editor must save LastScenario pref
This commit is contained in:
@@ -67,6 +67,8 @@ extern location cur_out;
|
||||
bool small_any_drawn = false;
|
||||
extern bool change_made;
|
||||
|
||||
extern void save_prefs();
|
||||
|
||||
rectangle left_buttons[NLS][2]; // 0 - whole, 1 - blue button
|
||||
std::array<lb_t,NLS> left_button_status;
|
||||
std::vector<rb_t> right_button_status;
|
||||
@@ -257,6 +259,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());
|
||||
save_prefs();
|
||||
restore_editor_state();
|
||||
undo_list.clear();
|
||||
update_edit_menu();
|
||||
|
@@ -37,6 +37,7 @@ fs::path temp_file_to_load;
|
||||
std::string last_load_file = "Blades of Exile Scenario";
|
||||
extern fs::path progDir, tempDir;
|
||||
extern bool cur_scen_is_mac;
|
||||
extern void save_prefs();
|
||||
|
||||
void print_write_position ();
|
||||
void load_spec_graphics();
|
||||
@@ -1110,6 +1111,7 @@ void save_scenario(bool rename) {
|
||||
}
|
||||
|
||||
set_pref("LastScenario", toFile.string());
|
||||
save_prefs();
|
||||
|
||||
extern cUndoList undo_list;
|
||||
undo_list.save();
|
||||
|
@@ -334,6 +334,8 @@ static void process_args(int argc, char* argv[]) {
|
||||
// On first launch, no need to clear the undo_list
|
||||
|
||||
set_pref("LastScenario", file);
|
||||
save_prefs();
|
||||
|
||||
restore_editor_state();
|
||||
change_made = false;
|
||||
ae_loading = true;
|
||||
@@ -520,6 +522,7 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
undo_list.clear();
|
||||
update_edit_menu();
|
||||
set_pref("LastScenario", file_to_load.string());
|
||||
save_prefs();
|
||||
restore_editor_state();
|
||||
change_made = false;
|
||||
} else if(!file_to_load.empty())
|
||||
|
Reference in New Issue
Block a user