Skip to content

Commit

Permalink
Sort suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed May 14, 2024
1 parent c4c5523 commit f689f0a
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 @@ -1251,9 +1251,9 @@ def fill_table(self, table: QTableWidget, data: list):
if table.objectName()=='bids' and key=='suffix' and self.target_datatype in self.bidsdatatypes:
table.setItem(i, 0, MyWidgetItem('suffix', iseditable=False))
suffix = self.datasource.dynamicvalue(self.target_run['bids'].get('suffix',''))
suffixes = self.allowed_suffixes.get(self.target_datatype, [''])
suffixes = sorted(self.allowed_suffixes.get(self.target_datatype, ['']))
suffix_dropdown = self.suffix_dropdown = QComboBox()
suffix_dropdown.addItems(sorted(suffixes))
suffix_dropdown.addItems(suffixes)
suffix_dropdown.setCurrentIndex(suffix_dropdown.findText(suffix))
suffix_dropdown.currentIndexChanged.connect(self.suffix_dropdown_change)
suffix_dropdown.setToolTip('The suffix that sets the different run types apart. First make sure the "Data type" dropdown-menu is set correctly before choosing the right suffix here')
Expand Down

0 comments on commit f689f0a

Please sign in to comment.