Author: ilor
Date: Mon Oct 13 20:29:34 2008
New Revision: 30134
URL: http://svn.gna.org/viewcvs/wesnoth?rev=30134&view=rev
Log:
editor2: only reload the map if the size has changed, speeds up certain
operations
Modified:
trunk/src/editor2/map_context.cpp
Modified: trunk/src/editor2/map_context.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/map_context.cpp?rev=30134&r1=30133&r2=30134&view=diff
==============================================================================
--- trunk/src/editor2/map_context.cpp (original)
+++ trunk/src/editor2/map_context.cpp Mon Oct 13 20:29:34 2008
@@ -164,8 +164,13 @@
void map_context::set_map(const editor_map& map)
{
+ if (map_.h() != map.h() || map_.w() != map.w()) {
+ set_needs_reload();
+ } else {
+ set_needs_terrain_rebuild();
+ }
map_ = map;
- set_needs_reload();
+
}
void map_context::perform_action(const editor_action& action)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits