forked from bartvdbraak/blender
Bugfix #24016
Removed dubious code for checking CTRL+C CTRL+V on buttons. This made copy/paste fail if you keep the modifier key holding.
This commit is contained in:
parent
694aef1933
commit
520e1b2090
@ -4933,14 +4933,11 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
|
||||
if (but->flag & UI_BUT_DISABLED)
|
||||
return WM_UI_HANDLER_CONTINUE;
|
||||
|
||||
if ((data->state == BUTTON_STATE_HIGHLIGHT) &&
|
||||
/* check prevval because of modal operators [#24016],
|
||||
* modifier check is to allow Ctrl+C for copy.
|
||||
* if this causes other problems, remove this check and suffer the bug :) - campbell */
|
||||
((event->prevval != KM_PRESS) || (ISKEYMODIFIER(event->prevtype)) || (event->type == EVT_DROP)))
|
||||
if ((data->state == BUTTON_STATE_HIGHLIGHT) || (event->type == EVT_DROP))
|
||||
{
|
||||
/* handle copy-paste */
|
||||
if (ELEM(event->type, CKEY, VKEY) && event->val == KM_PRESS && (event->ctrl || event->oskey)) {
|
||||
|
||||
ui_but_copy_paste(C, but, data, (event->type == CKEY) ? 'c' : 'v');
|
||||
return WM_UI_HANDLER_BREAK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user