diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 1c21069879a..814d8823817 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2166,12 +2166,23 @@ static int wm_exit_blender_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } +static int wm_exit_blender_invoke(bContext *C, wmOperator *op, const wmEvent *event) +{ + if (U.uiflag & USER_QUIT_PROMPT) { + return wm_exit_blender_exec(C, op); + } + else { + return WM_operator_confirm(C, op, event); + } +} + static void WM_OT_quit_blender(wmOperatorType *ot) { ot->name = "Quit Blender"; ot->idname = "WM_OT_quit_blender"; ot->description = "Quit Blender"; + ot->invoke = wm_exit_blender_invoke; ot->exec = wm_exit_blender_exec; } |