Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_info/info_report.c
| Show First 20 Lines • Show All 244 Lines • ▼ Show 20 Lines | static int box_select_exec(bContext *C, wmOperator *op) | ||||
| Report *report_min, *report_max; | Report *report_min, *report_max; | ||||
| rcti rect; | rcti rect; | ||||
| WM_operator_properties_border_to_rcti(op, &rect); | WM_operator_properties_border_to_rcti(op, &rect); | ||||
| const eSelectOp sel_op = RNA_enum_get(op->ptr, "mode"); | const eSelectOp sel_op = RNA_enum_get(op->ptr, "mode"); | ||||
| const int select = (sel_op != SEL_OP_SUB); | const int select = (sel_op != SEL_OP_SUB); | ||||
| if (SEL_OP_USE_PRE_DESELECT(sel_op)) { | if (SEL_OP_USE_PRE_DESELECT(sel_op)) { | ||||
| for (Report *report = reports->list.first; report; report = report->next) { | LISTBASE_FOREACH (Report *, report, &reports->list) { | ||||
| if ((report->type & report_mask) == 0) { | if ((report->type & report_mask) == 0) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| report->flag &= ~SELECT; | report->flag &= ~SELECT; | ||||
| } | } | ||||
| } | } | ||||
| report_min = info_text_pick(sinfo, region, reports, rect.ymax); | report_min = info_text_pick(sinfo, region, reports, rect.ymax); | ||||
| report_max = info_text_pick(sinfo, region, reports, rect.ymin); | report_max = info_text_pick(sinfo, region, reports, rect.ymin); | ||||
| /* get the first report if none found */ | /* get the first report if none found */ | ||||
| if (report_min == NULL) { | if (report_min == NULL) { | ||||
| // printf("find_min\n"); | // printf("find_min\n"); | ||||
| for (Report *report = reports->list.first; report; report = report->next) { | LISTBASE_FOREACH (Report *, report, &reports->list) { | ||||
| if (report->type & report_mask) { | if (report->type & report_mask) { | ||||
| report_min = report; | report_min = report; | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (report_max == NULL) { | if (report_max == NULL) { | ||||
| ▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines | |||||