Fix #112028: Ctrl+Alt+Scroll not working on all selected objects #112095
@ -278,12 +278,12 @@ static void ui_selectcontext_apply(bContext *C,
|
||||
const double value_orig);
|
||||
|
||||
/**
|
||||
* Only respond to events which are expected to be used for multi button editing,
|
||||
* e.g. ALT is also used for button array pasting, see #108096.
|
||||
*/
|
||||
# define IS_ALLSELECT_EVENT(event) \
|
||||
(((event)->modifier & KM_ALT) != 0 && \
|
||||
(ISMOUSE((event)->type) || ELEM((event)->type, EVT_RETKEY, EVT_PADENTER)))
|
||||
* Ideally we would only respond to events which are expected to be used for multi button editing
|
||||
* (additionally checking if this is a mouse[wheel] or returnkey event to avoid the ALT conflict
|
||||
* with button array pasting, see #108096, but unfortunately wheel events are not part of
|
||||
* win->eventstate with modifiers held down. Instead, the conflict is avoided by specifically
|
||||
* filtering out CTRL ALT V in ui_apply_but(). */
|
||||
# define IS_ALLSELECT_EVENT(event) (((event)->modifier & KM_ALT) != 0)
|
||||
|
||||
/** just show a tinted color so users know its activated */
|
||||
# define UI_BUT_IS_SELECT_CONTEXT UI_BUT_NODE_ACTIVE
|
||||
@ -2267,10 +2267,17 @@ static void ui_apply_but(
|
||||
if (data->select_others.elems_len == 0)
|
||||
{
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
/* may have been enabled before activating */
|
||||
if (data->select_others.is_enabled || IS_ALLSELECT_EVENT(win->eventstate)) {
|
||||
ui_selectcontext_begin(C, but, &data->select_others);
|
||||
data->select_others.is_enabled = true;
|
||||
wmEvent *event = win->eventstate;
|
||||
/* May have been enabled before activating, dont do for array pasting. */
|
||||
if (data->select_others.is_enabled || IS_ALLSELECT_EVENT(event)) {
|
||||
/* See comment for IS_ALLSELECT_EVENT why this needs to be filtered here. */
|
||||
const bool is_array_paste = (event->val == KM_PRESS) &&
|
||||
(event->modifier & (KM_CTRL | KM_OSKEY)) &&
|
||||
(event->modifier & KM_SHIFT) == 0 && (event->type == EVT_VKEY);
|
||||
if (!is_array_paste) {
|
||||
ui_selectcontext_begin(C, but, &data->select_others);
|
||||
data->select_others.is_enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data->select_others.elems_len == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user