Fix not accidentally forcing key to saved config when font size is saved
All checks were successful
CI / test (push) Successful in 3m57s
Lint / test (push) Successful in 30s
Trivy / test (push) Successful in 23s

This commit is contained in:
Miguel Jacq 2025-11-21 13:35:11 +11:00
parent 4f8d916346
commit e8db5bcf7d
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9

View file

@ -921,9 +921,11 @@ class MainWindow(QMainWindow):
size = self.cfg.font_size size = self.cfg.font_size
editor.qfont.setPointSize(size) editor.qfont.setPointSize(size)
editor.setFont(editor.qfont) editor.setFont(editor.qfont)
# save size to settings
self.cfg.font_size = size self.cfg.font_size = size
save_db_config(self.cfg) # save size to settings
cfg = load_db_config()
cfg.font_size = self.cfg.font_size
save_db_config(cfg)
def _retheme_overrides(self): def _retheme_overrides(self):
self._apply_calendar_text_colors() self._apply_calendar_text_colors()
@ -1075,7 +1077,10 @@ class MainWindow(QMainWindow):
new_size = old_size + delta new_size = old_size + delta
self.cfg.font_size = new_size self.cfg.font_size = new_size
save_db_config(self.cfg) # save size to settings
cfg = load_db_config()
cfg.font_size = self.cfg.font_size
save_db_config(cfg)
# Apply font size change to all open editors # Apply font size change to all open editors
self._apply_font_size_to_all_tabs(new_size) self._apply_font_size_to_all_tabs(new_size)