Skip to content

Commit

Permalink
tunit_create: fixed alignment icon paths being language-sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Feb 29, 2016
1 parent dff0957 commit 01168d5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gui/dialogs/unit_create.cpp
Expand Up @@ -326,10 +326,6 @@ void tunit_create::list_item_clicked(twindow& window)
+ ")";
}

const std::string& alignment_name = unit_type::alignment_description(
u->alignment(),
u->genders().front());

find_widget<timage>(&window, "type_image", false)
.set_label((u->icon().empty() ? u->image() : u->icon()) + tc);

Expand All @@ -351,6 +347,8 @@ void tunit_create::list_item_clicked(twindow& window)
r_icon.set_label("icons/unit-groups/race_" + u->race_id() + "_30.png");
r_icon.set_tooltip(u->race()->name(u->genders().front()));

const std::string& alignment_name = u->alignment().to_string();

timage& a_icon = find_widget<timage>(&window, "type_alignment", false);

a_icon.set_label("icons/alignments/alignment_" + alignment_name + "_30.png");
Expand Down

0 comments on commit 01168d5

Please sign in to comment.