for axis_index, axis_selector in enumerate(self.axis_selectors):
axis_selector = self.axis_selectors[axis_index]
within_bounds = axis_index < len(selector_keys)
axis_selector.setVisible(within_bounds)
axis_selector.setEnabled(within_bounds)
axis_selector.setCurrentText(selector_keys[axis_index] if within_bounds else "x")
After Change
self.axesEdit.textChanged.connect(self.validate_new_axiskeys)
different_axiskeys = set(input_axiskeys)
if len(different_axiskeys) == 1:
self.axesEdit.setText(different_axiskeys.pop())
else:
self.multi_axes_display.setToolTip("Select lanes with same number of axes to change their interpretation here")
self.axesEdit.setEnabled(False)