File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 1+ 2.7.0
2+ - feat: accept DCOR drag events from DCOR-Aid data browser
132.6.9
24 - fix: don't reset color and name of dataset during duplicate
35 matrix action (#96)
Original file line number Diff line number Diff line change @@ -439,15 +439,22 @@ def dragEnterEvent(self, e):
439439 def dropEvent (self , e ):
440440 """Add dropped files to view"""
441441 urls = e .mimeData ().urls ()
442- pathlist = []
443- for ff in urls :
444- pp = pathlib .Path (ff .toLocalFile ())
445- if pp .is_dir ():
446- pathlist += list (pp .rglob ("*.rtdc" ))
447- elif pp .suffix == ".rtdc" :
448- pathlist .append (pp )
449- if pathlist :
450- self .add_dataslot (paths = sorted (pathlist ))
442+ if urls :
443+ pathlist = []
444+ is_dcor = bool (urls [0 ].host ())
445+ for ff in urls :
446+ if is_dcor :
447+ # DCOR data
448+ pathlist .append (ff .toString ())
449+ else :
450+ pp = pathlib .Path (ff .toLocalFile ())
451+ if pp .is_dir ():
452+ pathlist += list (pp .rglob ("*.rtdc" ))
453+ elif pp .suffix == ".rtdc" :
454+ pathlist .append (pp )
455+ pathlist = sorted (pathlist )
456+ if pathlist :
457+ self .add_dataslot (paths = pathlist , is_dcor = is_dcor )
451458
452459 def init_analysis_view (self ):
453460 sub = widgets .MDISubWindowWOButtons (self )
You can’t perform that action at this time.
0 commit comments