Skip to content

Commit

Permalink
Added a condition in qt_gui.py to only set the font configuration if …
Browse files Browse the repository at this point in the history
…the lcd type is not NONE. This change prevents font settings from being applied to devices without an LCD.
  • Loading branch information
emcek committed May 4, 2024
1 parent b068542 commit 60d025f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dcspy/qt_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1158,8 +1158,9 @@ def _start_clicked(self) -> None:
for rb_key in self.bg_rb_device.buttons():
if not rb_key.isChecked():
rb_key.setEnabled(False)
fonts_cfg = FontsConfig(name=self.le_font_name.text(), **getattr(self, f'{self.device.lcd_name}_font'))
self.device.lcd_info.set_fonts(fonts_cfg)
if self.device.lcd_info.type != LcdType.NONE:
fonts_cfg = FontsConfig(name=self.le_font_name.text(), **getattr(self, f'{self.device.lcd_name}_font'))
self.device.lcd_info.set_fonts(fonts_cfg)
app_params = {'model': self.device, 'event': self.event}
app_thread = Thread(target=dcspy_run, kwargs=app_params)
app_thread.name = 'dcspy-app'
Expand Down

0 comments on commit 60d025f

Please sign in to comment.