Project

General

Profile

Actions

Bug #10260

closed

Two Delete and Shift functions do not work on an empty row

Added by Matt Foster over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
01/12/2023
Due date:
% Done:

100%

Estimated time:
Chirp Version:
next (py3)
Model affected:
Yaesu FT-60R
Platform:
Linux
Debug Log:
I read the instructions above:

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

Actions #1

Updated by Dan Smith over 1 year 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 :)

Actions #2

Updated by Matt Foster over 1 year ago

I’ve coded GUIs in pyGTK, so I’m definitely into pain.

Actions #3

Updated by Dan Smith over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF