This commit is contained in:
Kovid Goyal 2020-12-07 14:09:19 +05:30
parent 56e69950c1
commit 1f7775dda4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -25,7 +25,7 @@ class VoicesModel(QAbstractTableModel):
return len(self.current_voices) + 1 return len(self.current_voices) + 1
def columnCount(self, parent=None): def columnCount(self, parent=None):
return 3 return len(self.column_headers)
def headerData(self, section, orientation, role=Qt.ItemDataRole.DisplayRole): def headerData(self, section, orientation, role=Qt.ItemDataRole.DisplayRole):
if role == Qt.ItemDataRole.DisplayRole and orientation == Qt.Orientation.Horizontal: if role == Qt.ItemDataRole.DisplayRole and orientation == Qt.Orientation.Horizontal:
@ -163,7 +163,7 @@ class Widget(QWidget):
if om != self.system_default_output_module: if om != self.system_default_output_module:
ans['output_module'] = om ans['output_module'] = om
voice = self.selected_voice voice = self.selected_voice
if voice != VoicesModel.system_default_voice: if voice and voice != VoicesModel.system_default_voice:
ans['voice'] = voice ans['voice'] = voice
rate = self.rate rate = self.rate
if rate: if rate: