- circle select mouse wheel resize now works (somehow mouse wheel generates a mouse up event)

- context.active_bone wasnt set to an editbone type
This commit is contained in:
2009-11-05 15:59:14 +00:00
parent 5481549725
commit 0f1e28a13f
2 changed files with 10 additions and 7 deletions

View File

@@ -231,7 +231,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
if (EBONE_VISIBLE(arm, ebone)) {
if (ebone->flag & BONE_ACTIVE) {
CTX_data_pointer_set(result, &arm->id, &RNA_UnknownType, ebone);
CTX_data_pointer_set(result, &arm->id, &RNA_EditBone, ebone);
return 1;
}

View File

@@ -1666,7 +1666,7 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, wmEvent *event)
wmGesture *gesture= op->customdata;
rcti *rect= gesture->customdata;
int sx, sy;
switch(event->type) {
case MOUSEMOVE:
@@ -1681,23 +1681,26 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, wmEvent *event)
gesture_circle_apply(C, op);
break;
case WHEELUPMOUSE:
case WHEELDOWNMOUSE:
case PADMINUS:
case MINUSKEY:
rect->xmax += 2 + rect->xmax/10;
wm_gesture_tag_redraw(C);
break;
case WHEELDOWNMOUSE:
case WHEELUPMOUSE:
case PADPLUSKEY:
case EQUALKEY:
rect->xmax -= 2 + rect->xmax/10;
if(rect->xmax < 1) rect->xmax= 1;
wm_gesture_tag_redraw(C);
break;
case LEFTMOUSE:
case MIDDLEMOUSE:
// case MIDDLEMOUSE: /* ??? - somehow mouse wheel are interpreted as middle mouse release events - campbell */
case RIGHTMOUSE:
if(event->val==KM_RELEASE) { /* key release */
wm_gesture_end(C, op);
return OPERATOR_FINISHED;
}
else {
} else {
if( RNA_struct_find_property(op->ptr, "event_type") )
RNA_int_set(op->ptr, "event_type", event->type);