[Bf-blender-cvs] [5ad353b] master: Fix T41379: Drag n Drop .txt files text editor fails
Campbell Barton
noreply at git.blender.org
Mon Aug 11 02:22:21 CEST 2014
Commit: 5ad353b6c227e3f1b3330a91643ae24770e46b2d
Author: Campbell Barton
Date: Mon Aug 11 10:20:01 2014 +1000
Branches: master
https://developer.blender.org/rB5ad353b6c227e3f1b3330a91643ae24770e46b2d
Fix T41379: Drag n Drop .txt files text editor fails
by kevindietrich
===================================================================
M source/blender/editors/space_text/space_text.c
===================================================================
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index fbca9bc..1e710b8 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -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)
More information about the Bf-blender-cvs
mailing list