Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a bit of technical debt #733

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/data_classes/TagLine.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const icon = preload("res://visual/icons/tag/line.svg")
const known_attributes = ["transform", "opacity", "stroke", "stroke-opacity",
"stroke-width", "stroke-linecap", "x1", "y1", "x2", "y2", ]

func _init(pos := Vector2.ZERO) -> void:
func _init() -> void:
for attrib_name in known_attributes:
attributes[attrib_name] = DB.attribute(attrib_name)
super()
Expand Down
2 changes: 1 addition & 1 deletion src/data_classes/TagRect.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const known_attributes = ["transform", "opacity", "fill", "fill-opacity",
"stroke", "stroke-opacity", "stroke-width", "stroke-linejoin",
"x", "y", "width", "height", "rx", "ry",]

func _init(pos := Vector2.ZERO) -> void:
func _init() -> void:
for attrib_name in known_attributes:
attributes[attrib_name] = DB.attribute(attrib_name)
super()
Expand Down
2 changes: 0 additions & 2 deletions src/ui_elements/BetterLineEdit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ var first_click := false
var text_before_focus := ""

func _on_base_class_focus_entered() -> void:
process_mode = PROCESS_MODE_ALWAYS
first_click = true
text_before_focus = text

func _on_base_class_focus_exited() -> void:
process_mode = PROCESS_MODE_INHERIT
first_click = false
if Input.is_action_pressed("ui_cancel"):
text = text_before_focus
Expand Down
3 changes: 1 addition & 2 deletions src/ui_elements/pathdata_field.gd
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ func _on_commands_mouse_exited() -> void:
for field in fields:
if field.has_focus():
active_idx = cmd_idx
# Should switch out the controls for fake outs. This is safe even when
# you've focused a BetterLineEdit, because it pauses the tree.
# Should switch out the controls for fake outs.
if active_idx != cmd_idx:
fields = []
deactivate()
Expand Down