Quellcode durchsuchen

Fix editor parallax grid snap movement

Mark DiBarry vor 6 Monaten
Ursprung
Commit
ce139f7577
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  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