the random start ToD option is now properly saved and loaded...

...when use map default is used (bug #9532). There are only some gui
behaviour problems left but at least things are now consistent.

If "use map settings" is enable the flags can still be modified and
there's no way to see the defaults.

Also did a small code cleanup use lexical_cast_default instead of
using lexical_cast and use an exception handler to set the default.
This commit is contained in:
Mark de Wever 2007-07-26 19:32:37 +00:00
parent 31c614a40f
commit a81f6c719b
3 changed files with 7 additions and 6 deletions

View file

@ -13,6 +13,8 @@ Version 1.3.6+svn:
The change is incompatible with older trunk versions fixes (bug #9472).
* Show the (possibly bogus) GPV and fog settings of games with "Use map
settings" on in a darker font. (patch #771 by uso)
* the random start ToD option is now properly saved and loaded when use map
default is used (bug #9532)
* user interface:
* Enable "Save Game" and "View Chat Log" menu entries in replay mode.
* Add an additional line below the minimap in the "Multiplayer->Create game"

View file

@ -8,6 +8,8 @@ Version 1.3.6+svn:
different languages.
* Show the (possibly bogus) gold per village and fog settings of games with
"Use map settings" on in a darker font. (patch #771 by uso)
* The random starting time of day setting is will now be remembered if
"Use map settings" is used.
* User interface
* Enable "Save Game" and "View Chat Log" menu entries in replay mode.

View file

@ -501,12 +501,9 @@ void create::process_event()
map_size_label_.set_text(map_size.str());
if(use_map_settings_.checked()) {
try {
xp_modifier_slider_.set_value(lexical_cast<int>(parameters_.scenario_data["experience_modifier"]));
} catch(bad_lexical_cast&) {
xp_modifier_slider_.set_value(preferences::xp_modifier());
}
random_start_time_.set_check(::gamestatus::is_start_ToD(parameters_.scenario_data["random_start_time"]));
xp_modifier_slider_.set_value(lexical_cast_default<int>(
parameters_.scenario_data["experience_modifier"],
preferences::xp_modifier()));
}
}
}