uv stitch was executing on Enter-key release, making it not work when starting from operator search popup (pressing enter), also Plus/Minus keys would get incremented for key press and release.
This commit is contained in:
parent
1c32617f1e
commit
156047263e
@ -1444,18 +1444,22 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
|
|||||||
}
|
}
|
||||||
case PADENTER:
|
case PADENTER:
|
||||||
case RETKEY:
|
case RETKEY:
|
||||||
if (stitch_process_data(stitch_state, scene, 1)) {
|
if (event->val == KM_PRESS) {
|
||||||
stitch_exit(C, op, 1);
|
if (stitch_process_data(stitch_state, scene, 1)) {
|
||||||
return OPERATOR_FINISHED;
|
stitch_exit(C, op, 1);
|
||||||
|
return OPERATOR_FINISHED;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return stitch_cancel(C, op);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return stitch_cancel(C, op);
|
return OPERATOR_PASS_THROUGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Increase limit */
|
/* Increase limit */
|
||||||
case PADPLUSKEY:
|
case PADPLUSKEY:
|
||||||
case WHEELUPMOUSE:
|
case WHEELUPMOUSE:
|
||||||
if (event->alt) {
|
if (event->val == KM_PRESS && event->alt) {
|
||||||
stitch_state->limit_dist += 0.01f;
|
stitch_state->limit_dist += 0.01f;
|
||||||
if (!stitch_process_data(stitch_state, scene, 0)) {
|
if (!stitch_process_data(stitch_state, scene, 0)) {
|
||||||
return stitch_cancel(C, op);
|
return stitch_cancel(C, op);
|
||||||
@ -1468,7 +1472,7 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
|
|||||||
/* Decrease limit */
|
/* Decrease limit */
|
||||||
case PADMINUS:
|
case PADMINUS:
|
||||||
case WHEELDOWNMOUSE:
|
case WHEELDOWNMOUSE:
|
||||||
if (event->alt) {
|
if (event->val == KM_PRESS && event->alt) {
|
||||||
stitch_state->limit_dist -= 0.01f;
|
stitch_state->limit_dist -= 0.01f;
|
||||||
stitch_state->limit_dist = MAX2(0.01f, stitch_state->limit_dist);
|
stitch_state->limit_dist = MAX2(0.01f, stitch_state->limit_dist);
|
||||||
if (!stitch_process_data(stitch_state, scene, 0)) {
|
if (!stitch_process_data(stitch_state, scene, 0)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user