1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Another canvas texture optimization + bug fix with resizing

This commit is contained in:
Manolis Papadeas 2022-03-20 18:52:48 +02:00
parent 9e5db16994
commit 0e79138d87
2 changed files with 5 additions and 1 deletions

View file

@ -249,6 +249,10 @@ func undo_or_redo(
canvas.selection.update()
if action_name == "Scale":
for i in project.frames.size():
for j in project.layers.size():
var current_cel: Cel = project.frames[i].cels[j]
current_cel.image_texture.create_from_image(current_cel.image, 0)
canvas.camera_zoom()
canvas.grid.update()
canvas.pixel_grid.update()

View file

@ -126,7 +126,7 @@ func update_selected_cels_textures(project: Project = Global.current_project) ->
var layer_index: int = cel_index[1]
if frame_index < project.frames.size() and layer_index < project.layers.size():
var current_cel: Cel = project.frames[frame_index].cels[layer_index]
current_cel.image_texture.create_from_image(current_cel.image, 0)
current_cel.image_texture.set_data(current_cel.image)
if project == Global.current_project:
var container_index = Global.frames_container.get_child_count() - 1 - layer_index