[Bf-blender-cvs] [82e719ff876] master: Fix T64998: Multi window spin tool crash
Campbell Barton
noreply at git.blender.org
Fri Aug 16 14:22:55 CEST 2019
Commit: 82e719ff8764da6c48ba3de4e5c11226953002e8
Author: Campbell Barton
Date: Fri Aug 16 21:25:48 2019 +1000
Branches: master
https://developer.blender.org/rB82e719ff8764da6c48ba3de4e5c11226953002e8
Fix T64998: Multi window spin tool crash
There could be a more direct way to initialize a gizmo in a view,
for now this resolves the crash.
===================================================================
M source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
index 74700e59e99..7155348fed5 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
@@ -1008,8 +1008,17 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup)
});
}
- /* Become modal as soon as it's started. */
- gizmo_mesh_spin_redo_modal_from_setup(C, gzgroup);
+ wmWindow *win = CTX_wm_window(C);
+ if (win && win->active) {
+ bScreen *screen = WM_window_get_active_screen(win);
+ if (screen->active_region) {
+ ARegion *ar = CTX_wm_region(C);
+ if (screen->active_region == ar) {
+ /* Become modal as soon as it's started. */
+ gizmo_mesh_spin_redo_modal_from_setup(C, gzgroup);
+ }
+ }
+ }
}
static void gizmo_mesh_spin_redo_draw_prepare(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
More information about the Bf-blender-cvs
mailing list