Call text_to_pixels() when changing tool

This commit is contained in:
OverloadedOrama 2020-10-17 14:58:37 +03:00
parent ed6a1e4a28
commit 9d71b0cdd9

View file

@ -99,6 +99,9 @@ func assign_tool(name : String, button : int) -> void:
if slot.tool_node != null:
if slot.tool_node.name == name:
return
# If we leave the text tool, make sure to get rid of the TextEdit node
if slot.tool_node.name == "Text":
slot.tool_node.text_to_pixels()
panel.remove_child(slot.tool_node)
slot.tool_node.queue_free()