From 92d747b0c46e2645b7308edd31c778634c68c2c5 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 28 Jan 2022 16:42:23 +0100 Subject: 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. --- source/blender/windowmanager/intern/wm_event_system.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/windowmanager/intern/wm_event_system.c') 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; -- cgit v1.2.3