Changeset ba400d1 in sasview
- Timestamp:
- Nov 21, 2018 5:47:46 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 44c15fc
- Parents:
- 7f41584
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DroppableDataLoadWidget.py
r53c771e rba400d1 1 1 # global 2 import os 2 3 from PyQt5 import QtCore 3 4 from PyQt5 import QtGui … … 58 59 filenames=[] 59 60 for url in event.mimeData().urls(): 60 filenames.append(url.toLocalFile()) 61 files = url.toLocalFile() 62 if os.path.isdir(files): 63 # get content of dir into a list 64 content = [os.path.join(os.path.abspath(files), filename) 65 for filename in os.listdir(files)] 66 filenames += content 67 else: 68 filenames.append(files) 61 69 self.communicator.fileReadSignal.emit(filenames) 62 70 event.accept()
Note: See TracChangeset
for help on using the changeset viewer.