]> git.lyx.org Git - features.git/commitdiff
- Get rid of manifestly expensive debugging output in the most critical path in LyX
authorAsger Ottar Alstrup <alstrup@lyx.org>
Tue, 7 Nov 2006 22:17:12 +0000 (22:17 +0000)
committerAsger Ottar Alstrup <alstrup@lyx.org>
Tue, 7 Nov 2006 22:17:12 +0000 (22:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15796 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/QLPainter.C

index df9b279a48a395a8559b69263a74e2933fa1378a..d16525fc65399a8e7db43e7ec490709616b6c949 100644 (file)
@@ -236,8 +236,10 @@ int QLPainter::text(int x, int y, char_type const * s, size_t ls,
                // We need to draw the text as LTR as we use our own bidi code.
                setLayoutDirection(Qt::LeftToRight);
                if (isDrawingEnabled()) {
-                       lyxerr[Debug::PAINTING] << "draw " << std::string(str.toUtf8())
-                               << " at " << x << "," << y << std::endl;
+                       if (lyxerr.debugging(Debug::PAINTING)) {
+                               lyxerr[Debug::PAINTING] << "draw " << std::string(str.toUtf8())
+                                       << " at " << x << "," << y << std::endl;
+                       }
                        drawText(x, y, str);
                }
                // Here we use the font width cache instead of
@@ -258,3 +260,4 @@ int QLPainter::text(int x, int y, char_type const * s, size_t ls,
 
 } // namespace frontend
 } // namespace lyx
+