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

Remove unnecessary image.lock() lines

This commit is contained in:
Manolis Papadeas 2021-05-12 15:51:31 +03:00
parent e8b36bbc61
commit 1827381439
2 changed files with 1 additions and 2 deletions

View file

@ -693,7 +693,6 @@ func move_bitmap_values(bitmap : BitMap, move_offset := true) -> void:
var image : Image = bitmap_to_image(bitmap)
var selection_rect := image.get_used_rect()
var smaller_image := image.get_rect(selection_rect)
image.lock()
image.fill(Color(0))
var dst := selection_position
var x_diff = selection_end.x - size.x
@ -749,7 +748,6 @@ func resize_bitmap_values(bitmap : BitMap, new_size : Vector2, flip_x : bool, fl
dst.y = 0
else:
self.selection_offset.y = 0
image.lock()
image.fill(Color(0))
smaller_image.resize(new_size.x, new_size.y, Image.INTERPOLATE_NEAREST)
if flip_x:

View file

@ -47,5 +47,6 @@ func _pick_color(position : Vector2) -> void:
image.lock()
var color := image.get_pixelv(position)
image.unlock()
var button := BUTTON_LEFT if _color_slot == 0 else BUTTON_RIGHT
Tools.assign_color(color, button, false)