Fix T41379: Drag n Drop .txt files text editor fails
by kevindietrich
This commit is contained in:
parent
8e86c41c55
commit
5ad353b6c2
Notes:
blender-bot
2023-02-14 10:48:33 +01:00
Referenced by issue #41379, Drag n Drop .txt files into the text editor does not work (patch attached)
|
@ -462,10 +462,13 @@ static void text_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
|
|||
|
||||
static int text_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
|
||||
{
|
||||
if (drag->type == WM_DRAG_PATH)
|
||||
if (ELEM(drag->icon, ICON_FILE_SCRIPT, ICON_FILE_BLANK)) /* rule might not work? */
|
||||
return 1;
|
||||
return 0;
|
||||
if (drag->type == WM_DRAG_PATH) {
|
||||
/* rule might not work? */
|
||||
if (ELEM(drag->icon, ICON_FILE_SCRIPT, ICON_FILE_TEXT, ICON_FILE_BLANK)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void text_drop_copy(wmDrag *drag, wmDropBox *drop)
|
||||
|
|
Loading…
Reference in New Issue