diffpy / diffpy.pdfgui

graphical user interface for real space structure refinement to PDF
Other
18 stars 27 forks source link

multi-select a few cells #48

Closed dragonyanglong closed 2 years ago

dragonyanglong commented 3 years ago

Select several cells in phase panel. If Press “shift” and select a few cells, it works fine. But if press “control” (or “command” in mac) on keyboard, click a few cells. it shows:

Traceback (most recent call last):
  File "/home/ly0/Documents/billinge/dev/test_pdfgui_py3/diffpy.pdfgui/src/diffpy/pdfgui/gui/errorwrapper.py", line 59, in _f
    return func(*args, **kwargs)
  File "/home/ly0/Documents/billinge/dev/test_pdfgui_py3/diffpy.pdfgui/src/diffpy/pdfgui/gui/phaseconfigurepanel.py", line 453, in onEditorShown
    self._selectedCells = gridutils.getSelectedCells(self.gridAtoms)
  File "/home/ly0/anaconda3/envs/pdfgui_py37_test/lib/python3.7/site-packages/diffpy.utils-3.0.0-py3.7.egg/diffpy/utils/wx/gridutils.py", line 78, in getSelectedCells
    rcset.update(grid.GetSelectedCells())
TypeError: unhashable type: 'GridCellCoords'
dragonyanglong commented 2 years ago

In the gridutils.py file, only one line is changed from py2 (right) to py3 (left).

image

dragonyanglong commented 2 years ago

Temporary solution: comment out the problematic line of code (L78) in the diffpy utils package. It will not affect the working column or row selection. Side effect: press "control" (or command in mac) and select multi-cells, will only change the value of the first cell selected.

image

dragonyanglong commented 2 years ago