glcd: fix change of font

Origin commit data
------------------
Commit: f431b6ff4a
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-07-04 (Sat, 04 Jul 2020)

Origin message was:
------------------
- glcd: fix change of font
This commit is contained in:
vanhofen
2020-07-04 21:31:23 +02:00
parent a06e296681
commit be72920ba5
2 changed files with 3 additions and 1 deletions

View File

@@ -233,6 +233,8 @@ class cGLCD
bool dumpBuffer(fb_pixel_t *s, int format, const char *filename); bool dumpBuffer(fb_pixel_t *s, int format, const char *filename);
void UpdateBrightness(); void UpdateBrightness();
int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data); int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data);
void ReInitFont() { fonts_initialized = false; };
}; };
#endif #endif
#endif #endif

View File

@@ -174,7 +174,7 @@ int GLCD_Menu::exec(CMenuTarget* parent, const std::string & actionKey)
if (fileBrowser.exec(FONTDIR) == true) if (fileBrowser.exec(FONTDIR) == true)
{ {
t.glcd_font = fileBrowser.getSelectedFile()->Name; t.glcd_font = fileBrowser.getSelectedFile()->Name;
cglcd->Rescan(); cglcd->ReInitFont();
} }
return res; return res;
} }