Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-02-19 04:59:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-19 08:17:21 +0300
commit55ac296358a45fd11700df328fb47f061c8aca4f (patch)
tree0df91a4862652a917bcf354d9df63ce41cd5e4cf /source/blender/windowmanager/intern/wm_event_system.c
parent0767b63f1b81c664a18603f056d3952357d84484 (diff)
WM: move gizmo handler to it's own type
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index a307cd5d0f0..d40a9be9e9e 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2443,14 +2443,16 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
}
}
}
- else if (handler->gizmo_map) {
+ else if (handler->type == WM_HANDLER_TYPE_GIZMO) {
+ wmEventHandler_Gizmo *handler_gz = (wmEventHandler_Gizmo *)handler;
ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
- wmGizmoMap *gzmap = handler->gizmo_map;
+ wmGizmoMap *gzmap = handler_gz->gizmo_map;
+ BLI_assert(gzmap != NULL);
wmGizmo *gz = wm_gizmomap_highlight_get(gzmap);
- if (region->gizmo_map != handler->gizmo_map) {
- WM_gizmomap_tag_refresh(handler->gizmo_map);
+ if (region->gizmo_map != handler_gz->gizmo_map) {
+ WM_gizmomap_tag_refresh(handler_gz->gizmo_map);
}
wm_gizmomap_handler_context(C, handler);
@@ -2889,7 +2891,7 @@ static void wm_event_temp_tool_handler_apply(
/* Handle widgets first. */
wmEventHandler *handler_last = ar->handlers.last;
- while (handler_last && handler_last->gizmo_map == NULL) {
+ while (handler_last && handler_last->type != WM_HANDLER_TYPE_GIZMO) {
handler_last = handler_last->prev;
}
/* Head of list or after last gizmo. */