mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Change "Rectangle Select" undoredo action to "Select"
This commit is contained in:
parent
67ec887ad1
commit
59ee60151e
|
@ -1394,10 +1394,10 @@ msgstr ""
|
|||
msgid "Redo: Draw"
|
||||
msgstr ""
|
||||
|
||||
msgid "Undo: Rectangle Select"
|
||||
msgid "Undo: Select"
|
||||
msgstr ""
|
||||
|
||||
msgid "Redo: Rectangle Select"
|
||||
msgid "Redo: Select"
|
||||
msgstr ""
|
||||
|
||||
msgid "Undo: Scale"
|
||||
|
|
|
@ -233,7 +233,7 @@ func undo_or_redo(
|
|||
in [
|
||||
"Draw",
|
||||
"Draw Shape",
|
||||
"Rectangle Select",
|
||||
"Select",
|
||||
"Move Selection",
|
||||
"Scale",
|
||||
"Centralize",
|
||||
|
@ -311,10 +311,7 @@ func disable_button(button: BaseButton, disable: bool) -> void:
|
|||
if button is Button:
|
||||
for c in button.get_children():
|
||||
if c is TextureRect:
|
||||
if disable:
|
||||
c.modulate.a = 0.5
|
||||
else:
|
||||
c.modulate.a = 1
|
||||
c.modulate.a = 0.5 if disable else 1.0
|
||||
break
|
||||
|
||||
|
||||
|
|
|
@ -34,4 +34,4 @@ func apply_selection(position: Vector2) -> void:
|
|||
Global.canvas.selection.big_bounding_rectangle = project.get_selection_rectangle(
|
||||
project.selection_bitmap
|
||||
)
|
||||
Global.canvas.selection.commit_undo("Rectangle Select", undo_data)
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
|
|
|
@ -70,7 +70,7 @@ func apply_selection(_position: Vector2) -> void:
|
|||
if !_add and !_subtract and !_intersect:
|
||||
Global.canvas.selection.clear_selection()
|
||||
if _rect.size == Vector2.ZERO and Global.current_project.has_selection:
|
||||
Global.canvas.selection.commit_undo("Rectangle Select", undo_data)
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
|
||||
if _rect.size != Vector2.ZERO:
|
||||
var selection_bitmap_copy: BitMap = project.selection_bitmap.duplicate()
|
||||
|
@ -109,7 +109,7 @@ func apply_selection(_position: Vector2) -> void:
|
|||
Global.canvas.selection.big_bounding_rectangle = project.get_selection_rectangle(
|
||||
project.selection_bitmap
|
||||
)
|
||||
Global.canvas.selection.commit_undo("Rectangle Select", undo_data)
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
|
||||
|
||||
func set_ellipse(bitmap: BitMap, position: Vector2) -> void:
|
||||
|
|
|
@ -99,7 +99,7 @@ func apply_selection(_position) -> void:
|
|||
if !cleared:
|
||||
Global.canvas.selection.clear_selection()
|
||||
|
||||
Global.canvas.selection.commit_undo("Rectangle Select", undo_data)
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
_draw_points.clear()
|
||||
_last_position = Vector2.INF
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ func apply_selection(position: Vector2) -> void:
|
|||
Global.canvas.selection.big_bounding_rectangle = project.get_selection_rectangle(
|
||||
project.selection_bitmap
|
||||
)
|
||||
Global.canvas.selection.commit_undo("Rectangle Select", undo_data)
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
|
||||
|
||||
func flood_fill(position: Vector2, image: Image, bitmap: BitMap) -> void:
|
||||
|
|
|
@ -136,7 +136,7 @@ func apply_selection(_position) -> void:
|
|||
if !cleared:
|
||||
Global.canvas.selection.clear_selection()
|
||||
|
||||
Global.canvas.selection.commit_undo("Rectangle Select", undo_data)
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
_ongoing_selection = false
|
||||
_draw_points.clear()
|
||||
_ready_to_apply = false
|
||||
|
|
|
@ -92,7 +92,7 @@ func apply_selection(_position) -> void:
|
|||
if !_add and !_subtract and !_intersect:
|
||||
Global.canvas.selection.clear_selection()
|
||||
if _rect.size == Vector2.ZERO and Global.current_project.has_selection:
|
||||
Global.canvas.selection.commit_undo("Rectangle Select", undo_data)
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
if _rect.size != Vector2.ZERO:
|
||||
var operation := 0
|
||||
if _subtract:
|
||||
|
@ -130,7 +130,7 @@ func apply_selection(_position) -> void:
|
|||
mirror_y_rect.end.y = Global.current_project.y_symmetry_point - _rect.end.y + 1
|
||||
Global.canvas.selection.select_rect(mirror_y_rect.abs(), operation)
|
||||
|
||||
Global.canvas.selection.commit_undo("Rectangle Select", undo_data)
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
|
||||
|
||||
# Given an origin point and destination point, returns a rect representing
|
||||
|
|
|
@ -153,7 +153,7 @@ func _input(event: InputEvent) -> void:
|
|||
Global.has_focus = true
|
||||
dragged_gizmo = null
|
||||
if !is_moving_content:
|
||||
commit_undo("Rectangle Select", undo_data)
|
||||
commit_undo("Select", undo_data)
|
||||
|
||||
if dragged_gizmo:
|
||||
if dragged_gizmo.type == Gizmo.Type.SCALE:
|
||||
|
@ -466,7 +466,7 @@ func move_borders_end() -> void:
|
|||
|
||||
Global.current_project.selection_bitmap = selected_bitmap_copy
|
||||
if !is_moving_content:
|
||||
commit_undo("Rectangle Select", undo_data)
|
||||
commit_undo("Select", undo_data)
|
||||
else:
|
||||
Global.current_project.selection_bitmap_changed()
|
||||
update()
|
||||
|
@ -769,7 +769,7 @@ func select_all() -> void:
|
|||
clear_selection()
|
||||
var full_rect = Rect2(Vector2.ZERO, project.size)
|
||||
select_rect(full_rect)
|
||||
commit_undo("Rectangle Select", undo_data_tmp)
|
||||
commit_undo("Select", undo_data_tmp)
|
||||
|
||||
|
||||
func invert() -> void:
|
||||
|
@ -783,7 +783,7 @@ func invert() -> void:
|
|||
project.selection_bitmap_changed()
|
||||
self.big_bounding_rectangle = project.get_selection_rectangle(selection_bitmap_copy)
|
||||
project.selection_offset = Vector2.ZERO
|
||||
commit_undo("Rectangle Select", undo_data_tmp)
|
||||
commit_undo("Select", undo_data_tmp)
|
||||
|
||||
|
||||
func clear_selection(use_undo := false) -> void:
|
||||
|
|
Loading…
Reference in a new issue