Disconnect _cell_changed signal on edit abort

This commit is contained in:
Keith Edmunds 2023-04-10 13:58:32 +01:00
parent ebc087f1f6
commit 69d379ab10

View File

@ -383,6 +383,13 @@ class PlaylistTab(QTableWidget):
play controls and update display.
"""
# If edit was cancelled (eg, by pressing ESC), the signal will
# still be connected
try:
self.cellChanged.disconnect(self._cell_changed)
except TypeError:
pass
self.edit_cell_type = None
self.musicmuster.enable_play_next_controls()
self.musicmuster.actionSetNext.setEnabled(True)