disable continuous grab in the header, its more annoying then useful.

also NULL texture's point density tree data when copying to prevent possible double free.
This commit is contained in:
Campbell Barton 2011-04-04 03:25:05 +00:00
parent b344d80726
commit 37007a7bc8
2 changed files with 9 additions and 0 deletions

@ -798,6 +798,7 @@ Tex *localize_texture(Tex *tex)
if(texn->pd) {
texn->pd= MEM_dupallocN(texn->pd);
if(texn->pd->coba) {
texn->pd->point_tree = NULL;
texn->pd->coba= MEM_dupallocN(texn->pd->coba);
}

@ -726,6 +726,14 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
wrap = (U.uiflag & USER_CONTINUOUS_MOUSE) && ((op->flag & OP_GRAB_POINTER) || (ot->flag & OPTYPE_GRAB_POINTER));
}
/* exception, cont. grab in header is annoying */
if(wrap) {
ARegion *ar= CTX_wm_region(C);
if(ar && ar->regiontype == RGN_TYPE_HEADER) {
wrap= FALSE;
}
}
if(wrap) {
rcti *winrect= NULL;
ARegion *ar= CTX_wm_region(C);