Skip to content
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

Merged
merged 4 commits into from
Mar 23, 2018
Merged

Drop files #406

merged 4 commits into from
Mar 23, 2018

Conversation

ZanderBrown
Copy link
Contributor

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 preserved

Also included is a styling change following on comments on 5184723
(Yes i know it shouldn't really be in this PR)

This reverts commit d84a620.

Mode now has a toolbar entry and @ntoll has stated that the logs button isn't meant for general consumption
@ZanderBrown
Copy link
Contributor Author

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']:
Copy link
Member

@carlosperate carlosperate Mar 23, 2018

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.

Copy link
Member

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.

Copy link
Member

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.

@ntoll ntoll merged commit 752ab22 into mu-editor:master Mar 23, 2018
@ntoll
Copy link
Member

ntoll commented Mar 23, 2018

Thank you for this! :-)

@ZanderBrown ZanderBrown deleted the drop-files branch March 23, 2018 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants