[Kst] branches/work/kst/portto4/kst/src/libkstapp
Peter Kümmel
syntheticpp at yahoo.com
Mon Apr 26 18:59:38 CEST 2010
SVN commit 1119140 by kuemmel:
Stop arbitrary grow of memory consumption on Windows.
M +11 -2 view.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #1119139:1119140
@@ -540,9 +540,18 @@
fontSize = ApplicationSettings::self()->minimumFontSize();
}
- if (fontSize > 0) {
+ if (fontSize < 0)
+ return font;
+
+#ifdef Q_OS_WIN
+ // On Windows more and more memory gets allocated when fontsize
+ // is to detailed, somewhere some strange caching happens.
+ const double fontPrecision = 4;
+ fontSize = floor(fontSize * fontPrecision + 0.5) / fontPrecision;
+#endif
+
font.setPointSizeF(fontSize);
- }
+
return font;
}
More information about the Kst
mailing list