Skip to content

multi-select a few cells #48

Closed
Closed

Description

@dragonyanglong

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'

Activity

  1. dragonyanglong commented on Nov 21, 2021

    @dragonyanglong
    CollaboratorAuthor

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

    image

  2. dragonyanglong commented on Nov 21, 2021

    @dragonyanglong
    CollaboratorAuthor

    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

  3. added this to the v1.3 release milestone on Dec 6, 2021
  4. dragonyanglong commented on Dec 6, 2021

    @dragonyanglong
    CollaboratorAuthor
    • post an issue to wxpython github.
    • remove the temporary fix and revert back to show error message.
    • show a user friendly error message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions