diff --git a/src/Tools/Move.gd b/src/Tools/Move.gd index 4c2a07b9d..f56909d5d 100644 --- a/src/Tools/Move.gd +++ b/src/Tools/Move.gd @@ -45,7 +45,8 @@ func draw_start(pos: Vector2i) -> void: if Global.current_project.has_selection: selection_node.transform_content_start() _content_transformation_check = selection_node.is_moving_content - Global.canvas.measurements.update_measurement(Global.MeasurementMode.MOVE) + Global.canvas.sprite_changed_this_frame = true + Global.canvas.measurements.update_measurement(Global.MeasurementMode.MOVE) func draw_move(pos: Vector2i) -> void: @@ -63,7 +64,8 @@ func draw_move(pos: Vector2i) -> void: else: Global.canvas.move_preview_location = pos - _start_pos _offset = pos - Global.canvas.measurements.update_measurement(Global.MeasurementMode.MOVE) + Global.canvas.sprite_changed_this_frame = true + Global.canvas.measurements.update_measurement(Global.MeasurementMode.MOVE) func draw_end(pos: Vector2i) -> void: @@ -93,7 +95,8 @@ func draw_end(pos: Vector2i) -> void: _start_pos = Vector2.INF _snap_to_grid = false - Global.canvas.measurements.update_measurement(Global.MeasurementMode.NONE) + Global.canvas.sprite_changed_this_frame = true + Global.canvas.measurements.update_measurement(Global.MeasurementMode.NONE) func _snap_position(pos: Vector2) -> Vector2: diff --git a/src/UI/Canvas/Selection.gd b/src/UI/Canvas/Selection.gd index aac87e167..d4548e54f 100644 --- a/src/UI/Canvas/Selection.gd +++ b/src/UI/Canvas/Selection.gd @@ -370,7 +370,7 @@ func _resize_rect(pos: Vector2, dir: Vector2) -> void: func resize_selection() -> void: var size := big_bounding_rectangle.size.abs() - var selection_map: SelectionMap = Global.current_project.selection_map + var selection_map := Global.current_project.selection_map if is_moving_content: selection_map = original_bitmap preview_image.copy_from(original_preview_image) @@ -389,6 +389,7 @@ func resize_selection() -> void: Global.current_project.selection_map = selection_map_copy Global.current_project.selection_map_changed() queue_redraw() + Global.canvas.queue_redraw() func _gizmo_rotate() -> void: # Does not work properly yet @@ -423,6 +424,7 @@ func _gizmo_rotate() -> void: # Does not work properly yet Global.current_project.selection_map_changed() big_bounding_rectangle = bitmap_image.get_used_rect() queue_redraw() + Global.canvas.queue_redraw() func select_rect(rect: Rect2i, operation: int = SelectionOperation.ADD) -> void: @@ -475,6 +477,7 @@ func move_borders(move: Vector2i) -> void: marching_ants_outline.offset += Vector2(move) big_bounding_rectangle.position += move queue_redraw() + Global.canvas.queue_redraw() func move_borders_end() -> void: @@ -487,6 +490,7 @@ func move_borders_end() -> void: else: Global.current_project.selection_map_changed() queue_redraw() + Global.canvas.queue_redraw() func transform_content_start() -> void: @@ -503,6 +507,7 @@ func transform_content_start() -> void: original_big_bounding_rectangle = big_bounding_rectangle original_offset = Global.current_project.selection_offset queue_redraw() + Global.canvas.queue_redraw() func move_content(move: Vector2) -> void: @@ -547,6 +552,7 @@ func transform_content_confirm() -> void: is_moving_content = false is_pasting = false queue_redraw() + Global.canvas.queue_redraw() func transform_content_cancel() -> void: @@ -577,6 +583,7 @@ func transform_content_cancel() -> void: original_bitmap = SelectionMap.new() is_pasting = false queue_redraw() + Global.canvas.queue_redraw() func commit_undo(action: String, undo_data_tmp: Dictionary) -> void: