-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop files #406
Drop files #406
Conversation
Not sure what Travis doesn't like here |
# Grab a 'real' path from the url | ||
path = url.toLocalFile() | ||
# If the dropped file is a script or hex | ||
if os.path.splitext(path)[1].lower() in ['.py', '.hex']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any disadvantage in letting all files pass through, and then let the Editor._load
decide which files to process? This way there is also an informative message box saying if the file is not compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to re-using existing functionality for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK... I'll fix this to use existing functionality.
Thank you for this! :-) |
Fix #74 (only 2 years late...)
If a file is dropped on the editor (doesn't listen on panels) a signal is bubbled up and then handled by opening the file
However the signal is only fired if the dropped file is
*.py or *.hex
(case insensitive) for everything else the current behaviour is preservedAlso included is a styling change following on comments on 5184723
(Yes i know it shouldn't really be in this PR)