Fix the non working swap palette icon action.

This commit is contained in:
fendrin 2013-05-15 22:20:56 +02:00
parent 4e17d42679
commit f910dbf6f9
2 changed files with 3 additions and 1 deletions

View file

@ -603,7 +603,6 @@ bool editor_controller::execute_command(hotkey::HOTKEY_COMMAND command, int inde
return true;
case HOTKEY_EDITOR_PALETTE_ITEM_SWAP:
toolkit_->get_palette_manager()->active_palette().swap();
toolkit_->set_mouseover_overlay();
return true;
case HOTKEY_EDITOR_PARTIAL_UNDO:
if (dynamic_cast<const editor_action_chain*>(context_manager_->get_map_context().last_undo_action()) != NULL) {

View file

@ -258,6 +258,9 @@ template<class Item>
void editor_palette<Item>::swap()
{
std::swap(selected_fg_item_, selected_bg_item_);
select_fg_item(selected_fg_item_);
select_bg_item(selected_bg_item_);
set_dirty();
}
template void editor_palette<t_translation::t_terrain>::swap();
template void editor_palette<unit_type>::swap();