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.
This commit is contained in:
parent
8e4f55aba6
commit
82e719ff87
Notes:
blender-bot
2023-02-14 08:07:50 +01:00
Referenced by issue #64998, Multi window spin tool crash
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue