From be72920ba5a30bf089ecbea0f8b7b383691cb621 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 4 Jul 2020 21:31:23 +0200 Subject: [PATCH] glcd: fix change of font Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f431b6ff4a7f3d05f07b54b1e199aac10e433ece Author: vanhofen Date: 2020-07-04 (Sat, 04 Jul 2020) Origin message was: ------------------ - glcd: fix change of font --- src/driver/glcd/glcd.h | 2 ++ src/gui/glcdsetup.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/driver/glcd/glcd.h b/src/driver/glcd/glcd.h index 9696a3c0e..bba426a2a 100644 --- a/src/driver/glcd/glcd.h +++ b/src/driver/glcd/glcd.h @@ -233,6 +233,8 @@ class cGLCD bool dumpBuffer(fb_pixel_t *s, int format, const char *filename); void UpdateBrightness(); int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data); + + void ReInitFont() { fonts_initialized = false; }; }; #endif #endif diff --git a/src/gui/glcdsetup.cpp b/src/gui/glcdsetup.cpp index 64f4ccde8..efe7e7abd 100644 --- a/src/gui/glcdsetup.cpp +++ b/src/gui/glcdsetup.cpp @@ -174,7 +174,7 @@ int GLCD_Menu::exec(CMenuTarget* parent, const std::string & actionKey) if (fileBrowser.exec(FONTDIR) == true) { t.glcd_font = fileBrowser.getSelectedFile()->Name; - cglcd->Rescan(); + cglcd->ReInitFont(); } return res; }