Fixed various editor crashes related to drawing/filling operations

(bug #18298)
This commit is contained in:
Ignacio R. Morelle 2012-01-03 04:43:40 +00:00
parent 4a8df17429
commit 162ee4684e
2 changed files with 6 additions and 3 deletions

View file

@ -4,6 +4,7 @@ Version 1.9.13+svn:
sidebar
* Fixed terrain palette shrinking to the size of small categories when
switching maps (bug #19218)
* Fixed various crashes related to drawing/filling operations (bug #18928)
* Language and i18n:
* Updated translations: British English, Chinese (Simplified), Czech, Dutch,
Estonian, French, Galician, German, Hungarian, Latin, Norwegian, Serbian,

View file

@ -786,6 +786,8 @@ void editor_controller::refresh_after_action(bool drag_part)
reload_map();
return;
} else {
const std::set<map_location>& changed_locs = get_map_context().changed_locations();
if (get_map_context().needs_terrain_rebuild()) {
if ((auto_update_transitions_ == preferences::editor::TransitionUpdateMode::on)
|| ((auto_update_transitions_ == preferences::editor::TransitionUpdateMode::partial)
@ -794,16 +796,16 @@ void editor_controller::refresh_after_action(bool drag_part)
get_map_context().set_needs_terrain_rebuild(false);
gui().invalidate_all();
} else {
foreach (const map_location& loc, get_map_context().changed_locations()) {
foreach (const map_location& loc, changed_locs) {
gui().rebuild_terrain(loc);
}
gui().invalidate(get_map_context().changed_locations());
gui().invalidate(changed_locs);
}
} else {
if (get_map_context().everything_changed()) {
gui().invalidate_all();
} else {
gui().invalidate(get_map_context().changed_locations());
gui().invalidate(changed_locs);
}
}
if (get_map_context().needs_labels_reset()) {