widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #04496
[Merge] lp:~widelands-dev/widelands/bug-1171231 into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1171231 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1171231 in widelands: "Size of minimap in the editor not changed when new map is loaded"
https://bugs.launchpad.net/widelands/+bug/1171231
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1171231/+merge/275589
When a new map is created or loaded in the editor, the minimap window is now toggled twice in order to update its size.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1171231 into lp:widelands.
=== modified file 'src/editor/ui_menus/editor_main_menu_load_map.cc'
--- src/editor/ui_menus/editor_main_menu_load_map.cc 2015-10-02 09:26:57 +0000
+++ src/editor/ui_menus/editor_main_menu_load_map.cc 2015-10-23 21:43:59 +0000
@@ -48,7 +48,10 @@
curdir_ = mapdata.filename;
fill_table();
} else {
- dynamic_cast<EditorInteractive&>(*get_parent()).load(mapdata.filename);
+ EditorInteractive& eia = dynamic_cast<EditorInteractive&>(*get_parent());
+ eia.load(mapdata.filename);
+ eia.toggle_minimap();
+ eia.toggle_minimap();
die();
}
}
=== modified file 'src/editor/ui_menus/editor_main_menu_new_map.cc'
--- src/editor/ui_menus/editor_main_menu_new_map.cc 2015-10-02 07:02:00 +0000
+++ src/editor/ui_menus/editor_main_menu_new_map.cc 2015-10-23 21:43:59 +0000
@@ -154,6 +154,8 @@
map.recalc_whole_map(egbase.world());
eia.set_need_save(true);
+ eia.toggle_minimap();
+ eia.toggle_minimap();
die();
}
=== modified file 'src/editor/ui_menus/editor_main_menu_random_map.cc'
--- src/editor/ui_menus/editor_main_menu_random_map.cc 2015-10-10 11:47:22 +0000
+++ src/editor/ui_menus/editor_main_menu_random_map.cc 2015-10-23 21:43:59 +0000
@@ -518,6 +518,8 @@
eia.set_need_save(true);
eia.register_overlays();
+ eia.toggle_minimap();
+ eia.toggle_minimap();
die();
}
=== modified file 'src/wui/interactive_base.h'
--- src/wui/interactive_base.h 2015-04-18 11:20:53 +0000
+++ src/wui/interactive_base.h 2015-10-23 21:43:59 +0000
@@ -81,7 +81,8 @@
bool buildhelp();
void show_buildhelp(bool t);
- void toggle_buildhelp ();
+ void toggle_buildhelp();
+ void toggle_minimap();
/**
* sel_triangles determines whether the mouse pointer selects triangles.
@@ -126,8 +127,8 @@
}
protected:
- void toggle_minimap();
void hide_minimap();
+
UI::UniqueWindow::Registry & minimap_registry();
void mainview_move(int32_t x, int32_t y);
Follow ups