From 1b92b79cf0684b4b5c56278f6125f6d50d8dfb8c Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Fri, 1 Dec 2023 18:45:30 +0000 Subject: [PATCH] Stop inadvertent editing of cell after cancelling search --- app/playlists.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/playlists.py b/app/playlists.py index ff0ebb0..1714f56 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -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: