From e9e280557302c461bee220be1871692c8094bcd6 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 21 Apr 2021 15:04:44 +0200 Subject: Cleanup: Deduplicate file closing dialog logic Was doing almost the same thing in two places, plus I need the same for a third case. So better have a helper function for it. --- source/blender/windowmanager/wm_files.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/windowmanager/wm_files.h') diff --git a/source/blender/windowmanager/wm_files.h b/source/blender/windowmanager/wm_files.h index d54090a6025..533084e96e8 100644 --- a/source/blender/windowmanager/wm_files.h +++ b/source/blender/windowmanager/wm_files.h @@ -45,6 +45,7 @@ void wm_homefile_read(struct bContext *C, void wm_file_read_report(bContext *C, struct Main *bmain); void wm_close_file_dialog(bContext *C, struct wmGenericCallback *post_action); +bool wm_operator_close_file_dialog_if_needed(bContext *C, wmOperator *op, wmGenericCallbackFn exec_fn); bool wm_file_or_image_is_modified(const Main *bmain, const wmWindowManager *wm); void WM_OT_save_homefile(struct wmOperatorType *ot); -- cgit v1.2.3