From d917eb06de24d4d684337c52e32f7d3029c59071 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 1 Jan 2020 15:00:46 +0200 Subject: [PATCH] Updated fix for #53 to only work on 3.1.x As of 3.2.x, the fix has been implemented to Godot itself. See https://github.com/godotengine/godot/pull/34654 --- Scripts/Dialogs/PreferencesDialog.gd | 4 ++++ Scripts/Main.gd | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Scripts/Dialogs/PreferencesDialog.gd b/Scripts/Dialogs/PreferencesDialog.gd index c14bce513..c9c69f61c 100644 --- a/Scripts/Dialogs/PreferencesDialog.gd +++ b/Scripts/Dialogs/PreferencesDialog.gd @@ -74,6 +74,10 @@ func _on_Language_pressed(button : Button) -> void: Global.config_cache.set_value("preferences", "locale", TranslationServer.get_locale()) Global.config_cache.save("user://cache.ini") + # Update Translations + _on_PreferencesDialog_popup_hide() + _on_PreferencesDialog_about_to_show() + func _on_Theme_pressed(button : Button) -> void: var index := 0 var i := 0 diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 259cfd38c..05e074769 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -149,8 +149,10 @@ func _ready() -> void: for t in tools: t[0].connect("pressed", self, "_on_Tool_pressed", [t[0]]) - Global.left_color_picker.get_picker().move_child(Global.left_color_picker.get_picker().get_child(0), 1) - Global.right_color_picker.get_picker().move_child(Global.right_color_picker.get_picker().get_child(0), 1) + # Checks to see if it's 3.1.x + if Engine.get_version_info().major == 3 && Engine.get_version_info().minor < 2: + Global.left_color_picker.get_picker().move_child(Global.left_color_picker.get_picker().get_child(0), 1) + Global.right_color_picker.get_picker().move_child(Global.right_color_picker.get_picker().get_child(0), 1) Import.import_brushes("Brushes")