This commit is contained in:
Kovid Goyal 2022-08-09 08:48:40 +05:30
commit 75add47682
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -730,6 +730,8 @@ class ChooseThemeWidget(QWidget):
return default_theme()
def set_current_theme(self, name):
if not hasattr(self, "themes"):
return False
for i, t in enumerate(self.themes):
if t.get('name') == name:
self.theme_list.setCurrentRow(i, QItemSelectionModel.SelectionFlag.SelectCurrent | QItemSelectionModel.SelectionFlag.Clear)