File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -330,19 +330,23 @@ static void _setDefaultMods()
330330
331331/* *
332332 * Resets the options back to their defaults.
333+ * @param includeMods Reset mods to default as well.
333334 */
334- void resetDefault ()
335+ void resetDefault (bool includeMods )
335336{
336337 for (std::vector<OptionInfo>::iterator i = _info.begin (); i != _info.end (); ++i)
337338 {
338339 i->reset ();
339340 }
340341 backupDisplay ();
341342
342- mods.clear ();
343- if (!_dataList.empty ())
343+ if (includeMods)
344344 {
345- _setDefaultMods ();
345+ mods.clear ();
346+ if (!_dataList.empty ())
347+ {
348+ _setDefaultMods ();
349+ }
346350 }
347351}
348352
@@ -532,7 +536,7 @@ bool init(int argc, char *argv[])
532536 if (showHelp (argc, argv))
533537 return false ;
534538 create ();
535- resetDefault ();
539+ resetDefault (true );
536540 loadArgs (argc, argv);
537541 setFolders ();
538542 _setDefaultMods ();
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ namespace Options
6868 // / Creates the options info.
6969 void create ();
7070 // / Restores default options.
71- void resetDefault ();
71+ void resetDefault (bool includeMods );
7272 // / Initializes the options settings.
7373 bool init (int argc, char *argv[]);
7474 // / Loads options from YAML.
Original file line number Diff line number Diff line change @@ -91,15 +91,8 @@ OptionsDefaultsState::~OptionsDefaultsState()
9191 */
9292void OptionsDefaultsState::btnYesClick (Action *action)
9393{
94- std::vector< std::pair<std::string, bool > > prevMods (Options::mods);
95- Options::resetDefault ();
94+ Options::resetDefault (false );
9695 _game->loadLanguages ();
97-
98- if (_origin == OPT_MENU && prevMods != Options::mods)
99- {
100- Options::reload = true ;
101- }
102-
10396 _game->popState ();
10497 _state->btnOkClick (action);
10598}
You can’t perform that action at this time.
0 commit comments