Browse Source

Merge pull request #57082 from madmiraal/fix-50802

Rémi Verschelde 3 years ago
parent
commit
dda6d2674a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      scene/main/viewport.cpp

+ 2 - 2
scene/main/viewport.cpp

@@ -790,7 +790,7 @@ void Viewport::update_canvas_items() {
 }
 
 void Viewport::_set_size(const Size2i &p_size, const Size2i &p_size_2d_override, const Rect2i &p_to_screen_rect, const Transform2D &p_stretch_transform, bool p_allocated) {
-	if (size == p_size && size_allocated == p_allocated && stretch_transform == p_stretch_transform && p_size_2d_override == size_2d_override && to_screen_rect != p_to_screen_rect) {
+	if (size == p_size && size_allocated == p_allocated && stretch_transform == p_stretch_transform && p_size_2d_override == size_2d_override && to_screen_rect == p_to_screen_rect) {
 		return;
 	}
 
@@ -1090,7 +1090,7 @@ Transform2D Viewport::_get_input_pre_xform() const {
 
 	if (to_screen_rect.size.x != 0 && to_screen_rect.size.y != 0) {
 		pre_xf.elements[2] = -to_screen_rect.position;
-		pre_xf.scale(size / to_screen_rect.size);
+		pre_xf.scale(Vector2(size) / to_screen_rect.size);
 	}
 
 	return pre_xf;