fixed tile map editor plugin, all previews are now the same size, closes #4983

This commit is contained in:
Juan Linietsky 2016-06-12 17:10:34 -03:00
parent 4667f9e61e
commit be223c91f9
2 changed files with 7 additions and 1 deletions

View file

@ -729,7 +729,7 @@ static Rect2 _adjust_to_max_size(Size2 p_size, Size2 p_max_size) {
if (tex_width>size.width) {
tex_width=size.width;
tex_height=p_size.height * tex_width / p_size.height;
tex_height=p_size.height * tex_width / p_size.width;
}
int ofs_x=(size.width - tex_width)/2;