clear the pixmap cache and the font metrics cache in case of zoom or dpi changes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20867 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-10-09 14:10:55 +00:00
parent c1472a5c78
commit 89c7ca6a28

View File

@ -14,6 +14,7 @@
#include "qt_helpers.h"
#include "GuiApplication.h"
#include "GuiFontLoader.h"
#include "BufferList.h"
#include "Color.h"
@ -40,6 +41,7 @@
#include <QColorDialog>
#include <QFontDatabase>
#include <QLineEdit>
#include <QPixmapCache>
#include <QPushButton>
#include <QSpinBox>
#include <QString>
@ -469,6 +471,11 @@ void PrefScreenFonts::apply(LyXRC & rc) const
|| rc.sans_font_name != oldrc.sans_font_name
|| rc.typewriter_font_name != oldrc.typewriter_font_name
|| rc.zoom != oldrc.zoom || rc.dpi != oldrc.dpi) {
// The global QPixmapCache is used in GuiPainter to cache text
// painting so we must reset it in case any of the above
// parameter is changed.
QPixmapCache::clear();
guiApp->fontLoader().update();
form_->updateScreenFonts();
}
}