1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

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.
This commit is contained in:
Manolis Papadeas 2021-05-12 15:35:20 +03:00
parent 99ce07b3ab
commit e8b36bbc61

View file

@ -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"):