Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/space_image.c12
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)