Stop inadvertent editing of cell after cancelling search

This commit is contained in:
Keith Edmunds 2023-12-01 18:45:30 +00:00
parent 03f19dfb9c
commit 1b92b79cf0

View File

@ -460,6 +460,11 @@ class PlaylistTab(QTableView):
"""Unselect all tracks and reset drag mode"""
self.clearSelection()
# We want to remove the focus from any widget otherwise keyboard
# activity may edit a cell.
fw = self.musicmuster.focusWidget()
if fw:
fw.clearFocus()
self.setDragEnabled(False)
def _column_resize(self, column_number: int, _old: int, _new: int) -> None: