diff --git a/src/Preferences/PreferencesDialog.gd b/src/Preferences/PreferencesDialog.gd index e6821c35c..3a996ddcc 100644 --- a/src/Preferences/PreferencesDialog.gd +++ b/src/Preferences/PreferencesDialog.gd @@ -36,6 +36,10 @@ func _ready() -> void: # Replace OK with Close since preference changes are being applied immediately, not after OK confirmation get_ok().text = tr("Close") + if OS.get_name() == "HTML5": + right_side.get_node("General/OpenLastProject").visible = false + Global.open_last_project = false + for pref in preferences: var node = right_side.get_node(pref[1]) @@ -55,13 +59,6 @@ func _ready() -> void: Global.set(pref[0], value) node.set(pref[2], value) - if OS.get_name() == "HTML5": - right_side.get_node("General/EnableAutosave").visible = false - right_side.get_node("General/AutosaveInterval").visible = false - right_side.get_node("General/OpenLastProject").visible = false - Global.enable_autosave = false - Global.open_last_project = false - func _on_Preference_toggled(button_pressed : bool, prop : String) -> void: Global.set(prop, button_pressed)