فهرست منبع

Merge pull request #101808 from markdibarry/parallax-remove-editor-offset-guard

Fix editor `Parallax2D` grid snap movement
Thaddeus Crews 6 ماه پیش
والد
کامیت
3d6821b724
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      scene/2d/parallax_2d.cpp

+ 3 - 1
scene/2d/parallax_2d.cpp

@@ -69,7 +69,9 @@ void Parallax2D::_notification(int p_what) {
 
 #ifdef TOOLS_ENABLED
 void Parallax2D::_edit_set_position(const Point2 &p_position) {
-	set_scroll_offset(p_position);
+	// Avoids early return for grid snap compatibility
+	scroll_offset = p_position;
+	_update_scroll();
 }
 #endif // TOOLS_ENABLED