Fix #139195: Preferences are not automatically saved after keyitem_restore

Tag preference dirty when keyitem_restore is called. When window is
closed and is_dirty=true, WM_exit_ex() will call the function to update
the prefs.

Pull Request: https://projects.blender.org/blender/blender/pulls/139254
This commit is contained in:
Pratik Borhade 2025-05-23 00:36:41 +02:00 committed by Harley Acheson
parent cb77f6fd14
commit b48f3b0df4

View File

@ -381,6 +381,7 @@ class PREFERENCES_OT_keyitem_restore(Operator):
if (not kmi.is_user_defined) and kmi.is_user_modified:
km.restore_item_to_default(kmi)
context.preferences.is_dirty = True
return {'FINISHED'}