mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-13 19:01:03 +00:00
Allow drag-and-drop of all local files.
This commit is contained in:
parent
bd4c533309
commit
fa402c0d70
1 changed files with 6 additions and 5 deletions
|
|
@ -578,13 +578,14 @@ Version 2 or later.
|
|||
url = mime.urls()[0]
|
||||
if url.scheme() != 'file':
|
||||
return event.ignore()
|
||||
if not url.path().toLower().endsWith(ProjectExt):
|
||||
return event.ignore()
|
||||
event.accept()
|
||||
|
||||
def handleDropEvent(self, event):
|
||||
"""Handle drop event."""
|
||||
"""Handle drop event. Detects and loads project files, else sets the URL."""
|
||||
mime = event.mimeData()
|
||||
url = mime.urls()[0]
|
||||
filename = unicode(url.toLocalFile())
|
||||
loadproject(self, filename)
|
||||
if url.path().toLower().endswith(ProjectExt):
|
||||
filename = unicode(url.toLocalFile())
|
||||
loadproject(self, filename)
|
||||
else:
|
||||
self.urlinput.setText(url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue