Don't switch map contexts when opening the map currently being viewed

This commit is contained in:
Charles Dang 2015-10-09 15:15:27 +11:00
parent 0fe3bbd362
commit ae305e9cc7

View file

@ -851,7 +851,9 @@ bool context_manager::check_switch_open_map(const std::string& fn)
size_t i = check_open_map(fn);
if (i < map_contexts_.size()) {
gui2::show_transient_message(gui_.video(), _("This map is already open."), fn);
switch_context(i);
if (i != static_cast<unsigned>(current_context_index_)) {
switch_context(i);
}
return true;
}
return false;