bugfix [#20736] crash if lasso select while invisble object is selected
- also dont display empty menu's
This commit is contained in:
@@ -2240,7 +2240,8 @@ void uiPupMenuReports(bContext *C, ReportList *reports)
|
||||
}
|
||||
|
||||
str= BLI_dynstr_get_cstring(ds);
|
||||
ui_popup_menu_create(C, NULL, NULL, NULL, NULL, str);
|
||||
if(str[0] != '\0')
|
||||
ui_popup_menu_create(C, NULL, NULL, NULL, NULL, str);
|
||||
MEM_freeN(str);
|
||||
|
||||
BLI_dynstr_free(ds);
|
||||
|
||||
@@ -1589,7 +1589,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
|
||||
if (ak)
|
||||
CFRA= (int)ak->cfra;
|
||||
else
|
||||
BKE_report(op->reports, RPT_ERROR, "No more keyframes to jump to in this direction");
|
||||
BKE_report(op->reports, RPT_INFO, "No more keyframes to jump to in this direction");
|
||||
|
||||
/* free temp stuff */
|
||||
BLI_dlrbTree_free(&keys);
|
||||
|
||||
@@ -345,9 +345,8 @@ int lasso_inside_edge(short mcords[][2], short moves, int x0, int y0, int x1, in
|
||||
/* warning; lasso select with backbuffer-check draws in backbuf with persp(PERSP_WIN)
|
||||
and returns with persp(PERSP_VIEW). After lasso select backbuf is not OK
|
||||
*/
|
||||
static void do_lasso_select_pose(ViewContext *vc, short mcords[][2], short moves, short select)
|
||||
static void do_lasso_select_pose(ViewContext *vc, Object *ob, short mcords[][2], short moves, short select)
|
||||
{
|
||||
Object *ob= vc->obact;
|
||||
bPoseChannel *pchan;
|
||||
float vec[3];
|
||||
short sco1[2], sco2[2];
|
||||
@@ -382,7 +381,7 @@ static void do_lasso_select_objects(ViewContext *vc, short mcords[][2], short mo
|
||||
Base *base;
|
||||
|
||||
for(base= vc->scene->base.first; base; base= base->next) {
|
||||
if(base->lay & vc->v3d->lay) {
|
||||
if(BASE_SELECTABLE(vc->v3d, base)) { /* use this to avoid un-needed lasso lookups */
|
||||
project_short(vc->ar, base->object->obmat[3], &base->sx);
|
||||
if(lasso_inside(mcords, moves, base->sx, base->sy)) {
|
||||
|
||||
@@ -391,7 +390,7 @@ static void do_lasso_select_objects(ViewContext *vc, short mcords[][2], short mo
|
||||
base->object->flag= base->flag;
|
||||
}
|
||||
if(base->object->mode & OB_MODE_POSE) {
|
||||
do_lasso_select_pose(vc, mcords, moves, select);
|
||||
do_lasso_select_pose(vc, base->object, mcords, moves, select);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user