Bug #10260
closedTwo Delete and Shift functions do not work on an empty row
100%
Description
If a row is empty, the two "delete and shift" functions do not work.
Actual behavior:
Nothing happens to the blank row, and nothing is shifted. Further, there is the following traceback when attempting to do this. I'm sure this error occurs because there is nothing in the cells.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/chirp-next_20230112-py3.11.egg/chirp/wxui/memedit.py", line 900, in _delete_memories_at
LOG.debug('Moving memory %i -> %i', number, number - delta)
~~~~~^~~~~
TypeError: unsupported operand type(s) for -: 'str' and 'int'
Expected behavior:
The blank row would be removed and the rows beneath shifted up
Updated by Dan Smith almost 2 years ago
- Assignee set to Dan Smith
- Target version set to chirp-py3
Dammit Matt, you're making me look bad!
Actually the problem is running off the end of the regular memories and into the special channels, which are string-indexed and of course, shouldn't be moved. I didn't think about it (obviously) but I had a radio loaded with no special when I was implementing that. I didn't even have these delete-and-shift and insert things implemented in chirp-next until recently because I was sure nobody even used them. Either I was wrong or you like pain, but regardless, thanks for reporting :)
Updated by Matt Foster almost 2 years ago
I’ve coded GUIs in pyGTK, so I’m definitely into pain.
Updated by Dan Smith almost 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset github|713b686771ae682aa644f527083ec8cda5d76992.