From d817f2e5d378074e88babfe2b5f9b5374d8fe76c Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 11 Jan 2020 00:14:56 +0200 Subject: [PATCH] Fixed same issue as 6dfa3ac9b775f224c29db6c5521c26f6cedbf617 --- Scripts/Dialogs/PreferencesDialog.gd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Scripts/Dialogs/PreferencesDialog.gd b/Scripts/Dialogs/PreferencesDialog.gd index b4ccfb17e..04e848598 100644 --- a/Scripts/Dialogs/PreferencesDialog.gd +++ b/Scripts/Dialogs/PreferencesDialog.gd @@ -54,12 +54,14 @@ func _ready() -> void: guide_color.color = Global.guide_color # Set default values for Image - if Global.config_cache.has_section_key("preferences", "default_width") && Global.config_cache.has_section_key("preferences", "default_height"): + if Global.config_cache.has_section_key("preferences", "default_width"): var default_width = Global.config_cache.get_value("preferences", "default_width") - var default_height = Global.config_cache.get_value("preferences", "default_height") Global.default_image_width = int(default_width) - Global.default_image_height = int(default_height) default_width_value.value = Global.default_image_width + + if Global.config_cache.has_section_key("preferences", "default_height"): + var default_height = Global.config_cache.get_value("preferences", "default_height") + Global.default_image_height = int(default_height) default_height_value.value = Global.default_image_height if Global.config_cache.has_section_key("preferences", "default_fill_color"):