Fix T40154: UI Multi-drag sets value beyond max

This commit is contained in:
Campbell Barton
2014-05-15 13:09:02 +10:00
parent ff2ec05662
commit 9892f038ef

View File

@@ -986,6 +986,9 @@ static void ui_multibut_states_apply(bContext *C, uiHandleButtonData *data, uiBl
else {
but->active->value = mbut_state->origvalue + value_delta;
}
/* clamp based on soft limits, see: T40154 */
CLAMP(but->active->value, (double)but->softmin, (double)but->softmax);
}
ui_button_execute_end(C, ar, but, active_back);
}