Skip to content

Commit

Permalink
A minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Oct 1, 2024
1 parent a84d6c3 commit 3c97c1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bidscoin/bidseditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def show_contextmenu(self, pos):
if filenames:
datatype, ok = QInputDialog.getItem(self, 'Select the data type of the run-item(s)', 'datatype', datatypes, editable=False)
if datatype and ok:
datasource = bids.DataSource(dataformat=dataformat)
runitem = None
for filename in filenames:
datasource = bids.DataSource(filename, self.output_bidsmap.plugins, dataformat, self.output_bidsmap.options)
if datasource.has_support():
Expand All @@ -248,7 +248,7 @@ def show_contextmenu(self, pos):
self.ordered_file_index[dataformat] = {datasource.path: 0}
else:
self.ordered_file_index[dataformat][datasource.path] = max(self.ordered_file_index[dataformat][fname] for fname in self.ordered_file_index[dataformat]) + 1
if datasource.has_support():
if runitem:
self.update_subses_samples(dataformat)

elif action == delete:
Expand Down

0 comments on commit 3c97c1b

Please sign in to comment.