From e8b36bbc61154641ce9eec1f0a845a0061d3585d Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 12 May 2021 15:35:20 +0300 Subject: [PATCH] Fix symmetry guide crash when opening pxo files Related to the PoolVectorArray locking issue (#331). This still doesn't fix the issue itself, but at least Pixelorama does not crash anymore. It is still possible, though, to fail to load a guide when opening a project. Opening it again may solve the issue. --- src/Classes/Project.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Classes/Project.gd b/src/Classes/Project.gd index 5b0e9ca023a9..7fdcb30e1758 100644 --- a/src/Classes/Project.gd +++ b/src/Classes/Project.gd @@ -358,10 +358,10 @@ func deserialize(dict : Dictionary) -> void: if dict.has("symmetry_points"): x_symmetry_point = dict.symmetry_points[0] y_symmetry_point = dict.symmetry_points[1] - x_symmetry_axis.points[0].y = floor(y_symmetry_point / 2 + 1) - x_symmetry_axis.points[1].y = floor(y_symmetry_point / 2 + 1) - y_symmetry_axis.points[0].x = floor(x_symmetry_point / 2 + 1) - y_symmetry_axis.points[1].x = floor(x_symmetry_point / 2 + 1) + for point in x_symmetry_axis.points: + point.y = floor(y_symmetry_point / 2 + 1) + for point in y_symmetry_axis.points: + point.x = floor(x_symmetry_point / 2 + 1) if dict.has("export_directory_path"): directory_path = dict.export_directory_path if dict.has("export_file_name"):