else:
// If exactly one of the file"s datasets matches a user"s previous choice, use it.
if roleIndex not in self._default_h5n5_volumes:
self._default_h5n5_volumes[roleIndex] = set()
previous_selections = self._default_h5n5_volumes[roleIndex]
possible_auto_selections = previous_selections.intersection(datasetNames)
if len(possible_auto_selections) == 1:
selected_dataset = str(list(possible_auto_selections)[0])
else:
// Ask the user which dataset to choose
dlg = H5N5VolumeSelectionDlg(datasetNames, self)
if dlg.exec_() == QDialog.Accepted:
After Change
else:
auto_inner_paths = self._get_previously_used_inner_paths(roleIndex).intersection(set(datasetNames))
if len(auto_inner_paths) == 1:
selected_dataset = auto_inner_paths.pop()
else:
// Ask the user which dataset to choose
dlg = H5N5VolumeSelectionDlg(datasetNames, self)
if dlg.exec_() == QDialog.Accepted: