Fix changing font zoom level not updating font height cache
This commit is contained in:
@@ -2185,6 +2185,8 @@ void UpdateGUIZoom()
|
||||
_gui_zoom = static_cast<ZoomLevel>(_gui_zoom_cfg);
|
||||
}
|
||||
|
||||
ZoomLevel old_font_zoom = _font_zoom;
|
||||
|
||||
/* Determine real font zoom to use. */
|
||||
if (_font_zoom_cfg == ZOOM_LVL_CFG_AUTO) {
|
||||
_font_zoom = static_cast<ZoomLevel>(VideoDriver::GetInstance()->GetSuggestedUIZoom());
|
||||
@@ -2192,6 +2194,10 @@ void UpdateGUIZoom()
|
||||
_font_zoom = static_cast<ZoomLevel>(_font_zoom_cfg);
|
||||
}
|
||||
|
||||
if (old_font_zoom != _font_zoom) {
|
||||
ClearFontCache();
|
||||
}
|
||||
|
||||
UpdateFontHeightCache();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user