Fix T48595: UI glitch with driver menu re-opening
Holding Ctrl-D would keep opening driver menus.
This commit is contained in:
parent
520691e591
commit
b0985b393c
Notes:
blender-bot
2023-02-14 07:50:20 +01:00
Referenced by issue #48595, UI glitch when drawing GP over nodes
|
@ -6981,13 +6981,15 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
|
|||
!IS_EVENT_MOD(event, shift, oskey) &&
|
||||
(event->val == KM_PRESS))
|
||||
{
|
||||
if (event->alt)
|
||||
ui_but_anim_remove_driver(C);
|
||||
else if (event->ctrl)
|
||||
ui_but_anim_add_driver(C);
|
||||
|
||||
ED_region_tag_redraw(data->region);
|
||||
|
||||
/* quick check to prevent this opening within the popup menu its self */
|
||||
if (!ELEM(NULL, but->rnapoin.data, but->rnaprop)) {
|
||||
if (event->alt)
|
||||
ui_but_anim_remove_driver(C);
|
||||
else if (event->ctrl)
|
||||
ui_but_anim_add_driver(C);
|
||||
|
||||
ED_region_tag_redraw(data->region);
|
||||
}
|
||||
return WM_UI_HANDLER_BREAK;
|
||||
}
|
||||
/* handle keyingsets */
|
||||
|
|
Loading…
Reference in New Issue