Fix T55632: USE_DRAG_MULTINUM and USE_ALLSELECT not working well together

'is_copy' was not set correctly on all uiButMultiState (it was done once
for uiHandleButtonData), resulting in 'delta' being used on some indices
of the array and not others in `ui_selectcontext_apply`.

Maniphest Tasks: T55632

Differential Revision: https://developer.blender.org/D6201
This commit is contained in:
Philipp Oeser
2019-11-06 16:01:08 +01:00
parent 5cf5dfcfad
commit fe2b92d789

View File

@@ -1086,6 +1086,9 @@ static void ui_multibut_add(uiHandleButtonData *data, uiBut *but)
mbut_state = MEM_callocN(sizeof(*mbut_state), __func__);
mbut_state->but = but;
mbut_state->origvalue = ui_but_value_get(but);
# ifdef USE_ALLSELECT
mbut_state->select_others.is_copy = data->select_others.is_copy;
# endif
BLI_linklist_prepend(&data->multi_data.mbuts, mbut_state);