Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit cb48f4d

Browse files
committed
[[ Bug 22124 ]] Replace the content of a file property editor with dropped files
This patch fixes an issue where the file property editor was inserting drag and dropped file paths rather than replacing the entire content of the field.
1 parent 6f1e63e commit cb48f4d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Toolset/palettes/inspector/editors/com.livecode.pi.file.behavior.livecodescript

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,18 @@ on mouseUp pButton
6161
end if
6262
end if
6363
end mouseUp
64+
65+
on dragEnter
66+
if the dragData["files"] is empty then
67+
pass dragEnter
68+
end if
69+
set the dragAction to "link"
70+
end dragEnter
71+
72+
on dragDrop
73+
if the dragData["files"] is empty then
74+
pass dragDrop
75+
end if
76+
set the text of field 1 of me to line 1 of the dragData["files"]
77+
valueChanged
78+
end dragDrop

notes/bugfix-22124.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Replace content of file property editors when a file is dropped onto the field

0 commit comments

Comments
 (0)