From ad0b3abf539bbb358f799d3f36649b5d46f222c8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 24 Feb 2022 22:48:34 +1100 Subject: Cleanup: use flags for wmEvent modifier keys Using flags makes checking multiple modifiers at once more convenient and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag which have been removed. It also simplifies checking if modifier keys have changed. --- source/blender/editors/space_buttons/buttons_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_buttons') diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index cad6d34af24..e215b7c7992 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -282,11 +282,11 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) /* Useful yet irritating feature, Shift+Click to open the file * Alt+Click to browse a folder in the OS's browser. */ - if (event->shift || event->alt) { + if (event->modifier & (KM_SHIFT | KM_ALT)) { wmOperatorType *ot = WM_operatortype_find("WM_OT_path_open", true); PointerRNA props_ptr; - if (event->alt) { + if (event->modifier & KM_ALT) { char *lslash = (char *)BLI_path_slash_rfind(str); if (lslash) { *lslash = '\0'; -- cgit v1.2.3