diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-01-26 07:08:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-01-26 07:16:12 +0300 |
commit | d55d95b04da42f120406678fc47deb00081f7285 (patch) | |
tree | 35eebc8147a366c805be46e12885a61716aa0dab /source/blender/windowmanager/WM_api.h | |
parent | be262cf561293541b889a97026311adf3965a545 (diff) |
WM: return success from WM_recover_last_session, minor cleanup
- Return success from WM_recover_last_session
- Avoid setting global variables is already called in WM_file_read.
While it didn't cause any problems, these assignments ran even when
recovering the session failed to load the file.
- Return OPERATOR_CANCELLED when the operator fails.
Returning success is needed to fix T85011.
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 1f205a71338..540896664da 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -188,7 +188,7 @@ bool WM_stereo3d_enabled(struct wmWindow *win, bool only_fullscreen_test); void WM_file_autoexec_init(const char *filepath); bool WM_file_read(struct bContext *C, const char *filepath, struct ReportList *reports); void WM_autosave_init(struct wmWindowManager *wm); -void WM_recover_last_session(struct bContext *C, struct ReportList *reports); +bool WM_recover_last_session(struct bContext *C, struct ReportList *reports); void WM_file_tag_modified(void); struct ID *WM_file_append_datablock(struct Main *bmain, |