summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-12 17:10:34 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-12 17:10:34 -0300
commitbe223c91f93f8e5235a4425236a4c3254c3e62c1 (patch)
tree7eb0940e795a7b66216cedc3b0d21adcb3cf2328 /scene
parent4667f9e61ebacda472a8df123018625488a54645 (diff)
fixed tile map editor plugin, all previews are now the same size, closes #4983
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/item_list.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 483e04be3e..66e8fe10ff 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -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;