Commit 4411a20c authored by Thomas Vincent's avatar Thomas Vincent

add tooltip for coordinate system

parent 298653e7
......@@ -204,8 +204,14 @@ class ConversionParamsWidget(Qt.QWidget):
self.__coordinatesComboBox.currentIndexChanged[int].connect(
self.__coordinatesChanged)
tooltip = ['Select the QSpace histogram coordinate system:<br>']
for coordinates in QSpaceCoordinates.ALLOWED:
self.__coordinatesComboBox.addItem(coordinates)
self.__coordinatesComboBox.addItem(coordinates.capitalize())
tooltip.append('- <b>%s</b>: %s, %s and %s axes' %
((coordinates.capitalize(),) +
QSpaceCoordinates.axes_names(coordinates)))
self.__coordinatesComboBox.setToolTip('<br>'.join(tooltip))
qspaceLayout.addRow("Coordinates:", self.__coordinatesComboBox)
layout.addWidget(qspaceGbox)
......@@ -238,7 +244,7 @@ class ConversionParamsWidget(Qt.QWidget):
def __coordinatesChanged(self, index=None):
"""Handle change of QSpace coordinate change"""
coordinates = self.__coordinatesComboBox.currentText()
coordinates = self.getCoordinates()
for coord, widget in self.__qDimWidgets.items():
widget.setVisible(coordinates == coord)
......@@ -350,7 +356,7 @@ class ConversionParamsWidget(Qt.QWidget):
:rtype: List[Union[int,None]]
"""
if coordinates is None:
coordinates = self.__coordinatesComboBox.currentText()
coordinates = self.getCoordinates()
sizes = []
for edit in self.__qDimEdits[coordinates]:
......@@ -408,7 +414,7 @@ class ConversionParamsWidget(Qt.QWidget):
:rtype: QSpaceCoordinates
"""
return self.__coordinatesComboBox.currentText()
return self.__coordinatesComboBox.currentText().lower()
class QSpaceWidget(Qt.QDialog):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment