INNER CODE UNIT · Python
settings_dialog
Matteo842/SaveState · main.py:618
settings_dialog = SettingsDialog(current_settings.copy(), window, is_initial_setup=True) # Passa copia e parent
if settings_dialog.exec() == QDialog.Accepted:
new_settings = settings_dialog.get_settings()
# NOTE: If the user restored configs from backup, the dialog may have updated
# window state already. Reload from disk to ensure favorites/profiles/settings are current.
if settings_manager.save_settings(new_settings):
# Reload from disk to ensure we pick up any files restored by dialog
window.current_settings, _first = settings_manager.load_settings()
# Language handling removed - application is now English-only
window.theme_manager.update_theme() # Applica tema
# Reload favorites cache to reflect restored favorites immediately
try:
import importlib
from gui_components import favorites_manager as _fav
# Ensure module paths reflect the (possibly) new active config dir
_fav._cache_loaded = False
importlib.reload(_fav)
_fav._cache_loaded = False