[Bf-blender-cvs] [4ec0a8705b8] master: WM: categorize smart-zoom as a gesture
Campbell Barton
noreply at git.blender.org
Thu Jul 21 08:54:35 CEST 2022
Commit: 4ec0a8705b86e589c32fc532280dc2e443c87f84
Author: Campbell Barton
Date: Thu Jul 21 15:23:32 2022 +1000
Branches: master
https://developer.blender.org/rB4ec0a8705b86e589c32fc532280dc2e443c87f84
WM: categorize smart-zoom as a gesture
Event handling and the enum definition documents MOUSESMARTZOOM
as a gesture however it wasn't accepted by ISMOUSE_GESTURE,
instead it was added to the ISMOUSE macro.
Move the type check to ISMOUSE_GESTURE.
===================================================================
M source/blender/windowmanager/wm_event_types.h
===================================================================
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index edac3ada73b..2911c74e5a4 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -380,12 +380,11 @@ enum {
(event_type) == EVT_OSKEY)
/** Test whether the event is a mouse button. */
-#define ISMOUSE(event_type) \
- (((event_type) >= LEFTMOUSE && (event_type) <= BUTTON7MOUSE) || (event_type) == MOUSESMARTZOOM)
+#define ISMOUSE(event_type) ((event_type) >= LEFTMOUSE && (event_type) <= BUTTON7MOUSE)
/** Test whether the event is a mouse wheel. */
#define ISMOUSE_WHEEL(event_type) ((event_type) >= WHEELUPMOUSE && (event_type) <= WHEELOUTMOUSE)
/** Test whether the event is a mouse (track-pad) gesture. */
-#define ISMOUSE_GESTURE(event_type) ((event_type) >= MOUSEPAN && (event_type) <= MOUSEROTATE)
+#define ISMOUSE_GESTURE(event_type) ((event_type) >= MOUSEPAN && (event_type) <= MOUSESMARTZOOM)
/** Test whether the event is a mouse button (excluding mouse-wheel). */
#define ISMOUSE_BUTTON(event_type) \
(ELEM(event_type, \
More information about the Bf-blender-cvs
mailing list