mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Fixed an issue where Pixelorama crashed when a user coming from a new version to an old one and had selected a tool that doesn't exist in an older version
This commit is contained in:
parent
fe0fb7d21f
commit
35eeaf4e90
|
@ -68,8 +68,12 @@ func _ready() -> void:
|
|||
_tool_buttons = Global.find_node_by_name(Global.control, "ToolButtons")
|
||||
|
||||
var value = Global.config_cache.get_value(_slots[BUTTON_LEFT].kname, "tool", "Pencil")
|
||||
if not value in _tools:
|
||||
value = "Pencil"
|
||||
set_tool(value, BUTTON_LEFT)
|
||||
value = Global.config_cache.get_value(_slots[BUTTON_RIGHT].kname, "tool", "Eraser")
|
||||
if not value in _tools:
|
||||
value = "Eraser"
|
||||
set_tool(value, BUTTON_RIGHT)
|
||||
value = Global.config_cache.get_value(_slots[BUTTON_LEFT].kname, "color", Color.black)
|
||||
assign_color(value, BUTTON_LEFT, false)
|
||||
|
|
Loading…
Reference in a new issue