From 6dfa3ac9b775f224c29db6c5521c26f6cedbf617 Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 11 Jan 2020 00:08:24 +0200 Subject: [PATCH] Fixed issue where the size wouldn't change if the user modified only the width or the height --- Scripts/Canvas.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index 8884224..ee203e0 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -34,8 +34,10 @@ func _ready() -> void: if layers.empty(): var sprite := Image.new() if Global.is_default_image: - if Global.config_cache.has_section_key("preferences", "default_width") && Global.config_cache.has_section_key("preferences", "default_height"): - size = Vector2(Global.config_cache.get_value("preferences", "default_width"), Global.config_cache.get_value("preferences", "default_height")) + if Global.config_cache.has_section_key("preferences", "default_width"): + size.x = Global.config_cache.get_value("preferences", "default_width") + if Global.config_cache.has_section_key("preferences", "default_height"): + size.y = Global.config_cache.get_value("preferences", "default_height") if Global.config_cache.has_section_key("preferences", "default_fill_color"): fill_color = Global.config_cache.get_value("preferences", "default_fill_color") Global.is_default_image = !Global.is_default_image