ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
19 stars 4 forks source link

[BUG] GUI crash in plotter window on "Lines settings" #391

Closed MBartkowiakSTFC closed 3 months ago

MBartkowiakSTFC commented 3 months ago

Description of the error Plots in the MDANSE plotter offer context menus for customising the output. One of them leads to an instant crash.

Describe the expected result When right-clicking on a plot and choosing "Lines settings", the user should be shown a menu.

Describe the actual result The GUI crashes with the following output:

Traceback (most recent call last):
  File "/Users/maciej.bartkowiak/work/MDANSE/MDANSE_GUI/Src/MDANSE_GUI/Plotter/models/plot_1d_model.py", line 198, in data
    color = QtGui.QColor(r * 255, g * 255, b * 255)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
  QColor(color: Qt.GlobalColor): argument 1 has unexpected type 'float'
  QColor(rgb: int): argument 1 has unexpected type 'float'
  QColor(rgba64: QRgba64): argument 1 has unexpected type 'float'
  QColor(variant: Any): too many arguments
  QColor(): too many arguments
  QColor(r: int, g: int, b: int, alpha: int = 255): argument 1 has unexpected type 'float'
  QColor(name: str): argument 1 has unexpected type 'float'
  QColor(a0: QColor): argument 1 has unexpected type 'float'
Abort trap: 6

Suggested fix Some format conversion is necessary.

Additional details N/A