From 4b88d010effa7a1ec2b110be57b807f027b770b8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Mar 2024 07:01:47 +0530 Subject: [PATCH] Fix #2056793 [ebook-edit: Keyboard navigation error in file browser](https://bugs.launchpad.net/calibre/+bug/2056793) --- src/calibre/gui2/tweak_book/boss.py | 1 + src/calibre/gui2/tweak_book/file_list.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/calibre/gui2/tweak_book/boss.py b/src/calibre/gui2/tweak_book/boss.py index 690d5bef5a..0388c84314 100644 --- a/src/calibre/gui2/tweak_book/boss.py +++ b/src/calibre/gui2/tweak_book/boss.py @@ -1518,6 +1518,7 @@ class Boss(QObject): self.apply_container_update_to_gui() if master in editors: self.show_editor(master) + self.gui.file_list.merge_completed(master) self.gui.message_popup(_('{} files merged').format(len(names))) @in_thread_job diff --git a/src/calibre/gui2/tweak_book/file_list.py b/src/calibre/gui2/tweak_book/file_list.py index 6d2c95a184..0e9d454b21 100644 --- a/src/calibre/gui2/tweak_book/file_list.py +++ b/src/calibre/gui2/tweak_book/file_list.py @@ -1274,6 +1274,9 @@ class FileListWidget(QWidget): self.setFocusProxy(self.file_list) self.edit_next_file = self.file_list.edit_next_file + def merge_completed(self, master_name): + self.file_list.select_name(master_name, set_as_current_index=True) + def build(self, container, preserve_state=True): self.file_list.build(container, preserve_state=preserve_state)