fixed tile map editor plugin, all previews are now the same size, closes #4983
This commit is contained in:
parent
4667f9e61e
commit
be223c91f9
2 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue