mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Fix #1157 for the polygon select and the curve tool as well
This commit is contained in:
parent
59254b943f
commit
a698668930
|
@ -128,7 +128,6 @@ func draw_end(pos: Vector2i) -> void:
|
||||||
func draw_preview() -> void:
|
func draw_preview() -> void:
|
||||||
var previews := Global.canvas.previews_sprite
|
var previews := Global.canvas.previews_sprite
|
||||||
if not _drawing:
|
if not _drawing:
|
||||||
previews.texture = null
|
|
||||||
return
|
return
|
||||||
var points := _bezier()
|
var points := _bezier()
|
||||||
var image := Image.create(
|
var image := Image.create(
|
||||||
|
@ -207,6 +206,7 @@ func _clear() -> void:
|
||||||
_curve.clear_points()
|
_curve.clear_points()
|
||||||
_fill_inside_rect = Rect2i()
|
_fill_inside_rect = Rect2i()
|
||||||
_drawing = false
|
_drawing = false
|
||||||
|
Global.canvas.previews_sprite.texture = null
|
||||||
_editing_out_control_point = false
|
_editing_out_control_point = false
|
||||||
Global.canvas.previews.queue_redraw()
|
Global.canvas.previews.queue_redraw()
|
||||||
|
|
||||||
|
|
|
@ -89,8 +89,6 @@ func draw_preview() -> void:
|
||||||
image.set_pixelv(draw_point, Color.WHITE)
|
image.set_pixelv(draw_point, Color.WHITE)
|
||||||
var texture := ImageTexture.create_from_image(image)
|
var texture := ImageTexture.create_from_image(image)
|
||||||
previews.texture = texture
|
previews.texture = texture
|
||||||
else:
|
|
||||||
previews.texture = null
|
|
||||||
|
|
||||||
|
|
||||||
func apply_selection(pos: Vector2i) -> void:
|
func apply_selection(pos: Vector2i) -> void:
|
||||||
|
@ -122,6 +120,7 @@ func apply_selection(pos: Vector2i) -> void:
|
||||||
|
|
||||||
func _clear() -> void:
|
func _clear() -> void:
|
||||||
_ongoing_selection = false
|
_ongoing_selection = false
|
||||||
|
Global.canvas.previews_sprite.texture = null
|
||||||
_draw_points.clear()
|
_draw_points.clear()
|
||||||
_ready_to_apply = false
|
_ready_to_apply = false
|
||||||
Global.canvas.previews.queue_redraw()
|
Global.canvas.previews.queue_redraw()
|
||||||
|
|
Loading…
Reference in a new issue