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:
-rw-r--r--source/blender/windowmanager/WM_types.h2
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 24bf36455dd..b6947e5263a 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -1032,7 +1032,7 @@ typedef struct wmDrag {
float scale;
int sx, sy;
- /** Don't draw the icon or image (`imb`). */
+ /** Don't draw the icon or image (`imb`). Can be set in the `poll()` callback of the drop-box. */
bool no_preview;
/** If filled, draws operator tooltip/operator name. */
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 8c39b403810..9743153035e 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -392,6 +392,8 @@ static void wm_drop_operator_options(bContext *C, wmDrag *drag, const wmEvent *e
}
drag->tooltip[0] = 0;
+ /* Allow setting this in the `poll()`. */
+ drag->no_preview = false;
/* check buttons (XXX todo rna and value) */
if (UI_but_active_drop_name(C)) {