Added confirmation when clearing map labels (fixes #2371)
This commit is contained in:
parent
bd9e423a69
commit
40706a8837
2 changed files with 11 additions and 2 deletions
|
@ -61,6 +61,7 @@ Version 1.13.11:
|
|||
* Greatly improved behavior of sliders.
|
||||
* Fixed crash when modifying an existing friend entry in Preferences.
|
||||
* Fixed players being unable to start campaigns in MP mode.
|
||||
* Added confirmation prompt when clearing map labels.
|
||||
* WFL Engine:
|
||||
* A new string insert() function has been added, similar to replace()
|
||||
* WML Engine:
|
||||
|
|
|
@ -799,8 +799,16 @@ void menu_handler::label_terrain(mouse_handler& mousehandler, bool team_only)
|
|||
void menu_handler::clear_labels()
|
||||
{
|
||||
if(gui_->team_valid() && !board().is_observer()) {
|
||||
gui_->labels().clear(gui_->current_team_name(), false);
|
||||
resources::recorder->clear_labels(gui_->current_team_name(), false);
|
||||
const int res = gui2::show_message(
|
||||
_("Clear Labels"),
|
||||
_("Are you sure you want to clear map labels?"),
|
||||
gui2::dialogs::message::yes_no_buttons
|
||||
);
|
||||
|
||||
if(res == gui2::window::OK) {
|
||||
gui_->labels().clear(gui_->current_team_name(), false);
|
||||
resources::recorder->clear_labels(gui_->current_team_name(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue