From 1f7775dda408d5f91f83cdbb75530cc4eb025599 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 7 Dec 2020 14:09:19 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tts/linux_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/tts/linux_config.py b/src/calibre/gui2/tts/linux_config.py index 4437642a72..e005a5c991 100644 --- a/src/calibre/gui2/tts/linux_config.py +++ b/src/calibre/gui2/tts/linux_config.py @@ -25,7 +25,7 @@ class VoicesModel(QAbstractTableModel): return len(self.current_voices) + 1 def columnCount(self, parent=None): - return 3 + return len(self.column_headers) def headerData(self, section, orientation, role=Qt.ItemDataRole.DisplayRole): if role == Qt.ItemDataRole.DisplayRole and orientation == Qt.Orientation.Horizontal: @@ -163,7 +163,7 @@ class Widget(QWidget): if om != self.system_default_output_module: ans['output_module'] = om voice = self.selected_voice - if voice != VoicesModel.system_default_voice: + if voice and voice != VoicesModel.system_default_voice: ans['voice'] = voice rate = self.rate if rate: