diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-19 04:20:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-19 07:54:06 +0300 |
commit | 7f65ab86e59f25e718213287273705cfd34e1746 (patch) | |
tree | 159ecb2d3d1fa4dbdc23f1da6df24879bcbda2ec /source/blender/windowmanager | |
parent | 1beb6b43c162f657607b49df9d583b38a160d683 (diff) |
Cleanup: sync vertex-paint and sculpt from 2.8
Sync API changes from 2.8 to master.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 14 |
2 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 965eb2b258a..b7639889bcd 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -116,7 +116,7 @@ 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); -void WM_file_tag_modified(const struct bContext *C); +void WM_file_tag_modified(void); void WM_lib_reload(struct Library *lib, struct bContext *C, struct ReportList *reports); diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 21e6abacfec..2d72bcf4d58 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -315,10 +315,8 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) } /* in case UserDef was read, we re-initialize all, and do versioning */ -static void wm_init_userdef(bContext *C, const bool read_userdef_from_memory) +static void wm_init_userdef(Main *bmain, const bool read_userdef_from_memory) { - Main *bmain = CTX_data_main(C); - /* versioning is here */ UI_init_userdef(); @@ -579,7 +577,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports) if (retval == BKE_BLENDFILE_READ_OK_USERPREFS) { /* in case a userdef is read from regular .blend */ - wm_init_userdef(C, false); + wm_init_userdef(G.main, false); } if (retval != BKE_BLENDFILE_READ_FAIL) { @@ -840,7 +838,7 @@ int wm_homefile_read( if (use_userdef) { /* check userdef before open window, keymaps etc */ - wm_init_userdef(C, read_userdef_from_memory); + wm_init_userdef(CTX_data_main(C), read_userdef_from_memory); } /* match the read WM with current WM */ @@ -1351,13 +1349,13 @@ void wm_open_init_use_scripts(wmOperator *op, bool use_prefs) /** \} */ -void WM_file_tag_modified(const bContext *C) +void WM_file_tag_modified(void) { - wmWindowManager *wm = CTX_wm_manager(C); + wmWindowManager *wm = G.main->wm.first; if (wm->file_saved) { wm->file_saved = 0; /* notifier that data changed, for save-over warning or header */ - WM_event_add_notifier(C, NC_WM | ND_DATACHANGED, NULL); + WM_main_add_notifier(NC_WM | ND_DATACHANGED, NULL); } } |