diff options
author | Jacques Lucke <jacques@blender.org> | 2020-03-12 21:34:59 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-03-12 21:36:13 +0300 |
commit | 649fdc793851a214f54c9ecdaae4c120c4bd11c9 (patch) | |
tree | 09ad186adcb69c1924987c31df288d1e6b5fc044 /source/blender/editors/space_image | |
parent | 11e48277386c1811507878e3ffe7f7e10e26ac20 (diff) |
Fix T73049: Drag & drop on overlapping panels behaves incorrectly
Reviewers: brecht, Severin
Differential Revision: https://developer.blender.org/D7024
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index dc546e5baf5..42a8a746eef 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -262,18 +262,22 @@ static void image_keymap(struct wmKeyConfig *keyconf) } /* dropboxes */ -static bool image_drop_poll(bContext *UNUSED(C), +static bool image_drop_poll(bContext *C, wmDrag *drag, - const wmEvent *UNUSED(event), + const wmEvent *event, const char **UNUSED(tooltip)) { + ScrArea *area = CTX_wm_area(C); + if (ED_region_overlap_isect_any_xy(area, &event->x)) { + return false; + } if (drag->type == WM_DRAG_PATH) { /* rule might not work? */ if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) { - return 1; + return true; } } - return 0; + return false; } static void image_drop_copy(wmDrag *drag, wmDropBox *drop) |