Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bug #21282

  • Loading branch information...
commit 8607866d12281afc93c629f55523edca73e072ad 1 parent 6fe2267
@fendrin fendrin authored
View
6 src/editor/action/mouse/mouse_action.cpp
@@ -145,10 +145,8 @@ bool mouse_action::has_ctrl_modifier() const
void mouse_action::set_terrain_mouse_overlay(editor_display& disp, const t_translation::t_terrain & fg,
const t_translation::t_terrain & bg)
{
- surface image_fg(image::get_image("terrain/"
- + disp.get_map().get_terrain_info(fg).editor_image() + ".png"));
- surface image_bg(image::get_image("terrain/"
- + disp.get_map().get_terrain_info(bg).editor_image() + ".png"));
+ surface image_fg(image::get_image(disp.get_map().get_terrain_info(fg).editor_image()));
+ surface image_bg(image::get_image(disp.get_map().get_terrain_info(bg).editor_image()));
if (image_fg == NULL || image_bg == NULL) {
ERR_ED << "Missing terrain icon\n";
View
4 src/editor/palette/terrain_palettes.cpp
@@ -164,7 +164,7 @@ void terrain_palette::draw_item(const t_translation::t_terrain& terrain,
//Draw default base for overlay terrains
if(base_terrain != t_translation::NONE_TERRAIN) {
- const std::string base_filename = "terrain/" + map().get_terrain_info(base_terrain).editor_image() + ".png";
+ const std::string base_filename = map().get_terrain_info(base_terrain).editor_image();
surface base_image(image::get_image(base_filename));
if(base_image == NULL) {
@@ -183,7 +183,7 @@ void terrain_palette::draw_item(const t_translation::t_terrain& terrain,
}
}
- const std::string filename = "terrain/" + map().get_terrain_info(terrain).editor_image() + ".png";
+ const std::string filename = map().get_terrain_info(terrain).editor_image();
image = image::get_image(filename);
if(image == NULL) {
tooltip_text << "IMAGE NOT FOUND\n";
Please sign in to comment.
Something went wrong with that request. Please try again.