widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #04500
[Merge] lp:~widelands-dev/widelands/bug-1509452 into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1509452 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1509452 in widelands: "Scenario maps aren't loaded as scenarios"
https://bugs.launchpad.net/widelands/+bug/1509452
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1509452/+merge/275631
Scenario maps are now loaded as scenarios again.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1509452 into lp:widelands.
=== modified file 'src/ui_fsmenu/mapselect.cc'
--- src/ui_fsmenu/mapselect.cc 2015-10-23 10:17:13 +0000
+++ src/ui_fsmenu/mapselect.cc 2015-10-24 16:38:19 +0000
@@ -57,8 +57,7 @@
basedir_("maps"),
settings_(settings),
ctrl_(ctrl),
- has_translated_mapname_(false),
- is_scenario_(false)
+ has_translated_mapname_(false)
{
curdir_ = basedir_,
title_.set_textstyle(UI::TextStyle::ui_big());
@@ -153,12 +152,6 @@
}
-bool FullscreenMenuMapSelect::is_scenario()
-{
- return is_scenario_;
-}
-
-
MapData const * FullscreenMenuMapSelect::get_map() const
{
if (!table_.has_selection()) {
@@ -177,7 +170,7 @@
curdir_ = mapdata.filename;
fill_table();
} else {
- if (is_scenario()) {
+ if (maps_data_[table_.get_selected()].maptype == MapData::MapType::kScenario) {
end_modal<FullscreenMenuBase::MenuTarget>(FullscreenMenuBase::MenuTarget::kScenarioGame);
} else {
end_modal<FullscreenMenuBase::MenuTarget>(FullscreenMenuBase::MenuTarget::kNormalGame);
=== modified file 'src/ui_fsmenu/mapselect.h'
--- src/ui_fsmenu/mapselect.h 2015-10-02 09:26:57 +0000
+++ src/ui_fsmenu/mapselect.h 2015-10-24 16:38:19 +0000
@@ -82,7 +82,6 @@
UI::Checkbox* cb_show_all_maps_;
std::vector<UI::Checkbox*> tags_checkboxes_;
- bool is_scenario_;
Map::ScenarioTypes scenario_types_;
std::vector<std::string> tags_ordered_;
Follow ups