diff options
author | Julian Eisel <julian@blender.org> | 2022-01-28 18:42:23 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-01-28 18:53:37 +0300 |
commit | 92d747b0c46e2645b7308edd31c778634c68c2c5 (patch) | |
tree | 0516b51e31fbd2c95c57d2d42cde12f6c4d1e7cf /source/blender/windowmanager/intern/wm_event_system.c | |
parent | 4e93918b35facdc1ef8aa84d234c0687418006e2 (diff) |
Drag & drop: Support using context of hovered button when dropping
Buttons can hold context and it's very useful to use this as a way to
let buttons provide context for drop operators.
For example, with this D13549 can make the material slot list set the
material-slot pointer for each row, and the drop operator can just query
that.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 9d2c97e151f..6cded3dfdb5 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -3076,6 +3076,8 @@ static int wm_handlers_do_intern(bContext *C, wmWindow *win, wmEvent *event, Lis event->customdata = NULL; event->custom = 0; + wm_drop_end(C, drag, drop); + /* XXX fileread case. */ if (CTX_wm_window(C) == NULL) { return action; |