diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index f0ff32c72fe..d25a00e7dc4 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -3192,6 +3192,17 @@ void WM_OT_open_mainfile(wmOperatorType *ot) /** \name Reload (revert) Main .blend File Operator * \{ */ +static int wm_revert_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) +{ + return WM_operator_confirm_ex(C, + op, + IFACE_("Revert to the Saved File"), + IFACE_("Any unsaved changes will be lost."), + IFACE_("Revert"), + ALERT_ICON_WARNING, + false); +} + static int wm_revert_mainfile_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); @@ -3223,7 +3234,7 @@ void WM_OT_revert_mainfile(wmOperatorType *ot) ot->idname = "WM_OT_revert_mainfile"; ot->description = "Reload the saved file"; - ot->invoke = WM_operator_confirm; + ot->invoke = wm_revert_mainfile_invoke; ot->exec = wm_revert_mainfile_exec; ot->poll = wm_revert_mainfile_poll;