[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Mon Sep 19 03:00:39 CEST 2005
SVN commit 461892 by staikos:
remove extra draws and temporary debug messages that aren't needed. This fixes
rotation and other properties of labels, which weren't updating properly.
M +8 -19 kstviewlabel.cpp
--- trunk/extragear/graphics/kst/kst/kstviewlabel.cpp #461891:461892
@@ -140,8 +140,6 @@
if (_rotation != rotation) {
setDirty();
_rotation = rotation;
- kdDebug() << "setRotation\n";
- drawToBuffer(_parsed);
}
}
@@ -150,8 +148,6 @@
if (_justify != justify) {
setDirty();
_justify = justify;
- kdDebug() << "setJustification\n";
- drawToBuffer(_parsed);
}
}
@@ -172,8 +168,6 @@
if (_fontName != fontName) {
setDirty();
_fontName = fontName;
- kdDebug() << "setFontName\n";
- drawToBuffer(_parsed);
}
}
@@ -202,16 +196,16 @@
if (replace != _replace) {
setDirty();
_replace = replace;
- kdDebug() << "setDoScalarReplacement\n";
- drawToBuffer(_parsed);
}
}
void KstViewLabel::drawToBuffer(Label::Parsed *lp) {
+#if 0
if (dirty()) {
- //computeTextSize(lp); // hmm this is inefficient
+ computeTextSize(lp); // hmm this is inefficient
}
+#endif
setDirty(false);
@@ -334,7 +328,6 @@
}
}
KstBorderedViewObject::paint(type, p);
-
}
@@ -370,8 +363,8 @@
void KstViewLabel::setFontSize(int size) {
if (_fontSize != size) {
- _absFontSize = size+KstSettings::globalSettings()->plotFontSize;
- if (_absFontSize<MIN_FONT_SIZE) {
+ _absFontSize = size + KstSettings::globalSettings()->plotFontSize;
+ if (_absFontSize < MIN_FONT_SIZE) {
_absFontSize = MIN_FONT_SIZE;
}
@@ -387,15 +380,13 @@
void KstViewLabel::adjustSizeForText(QRect w) {
-
if (_autoResize) {
- int x_pix, y_pix;
double x_s, y_s, s;
x_s = y_s = _fontSize + (double)KstSettings::globalSettings()->plotFontSize;
- x_pix = w.width();
- y_pix = w.height();
+ int x_pix = w.width();
+ int y_pix = w.height();
if (x_pix < y_pix) {
x_s *= x_pix/540.0;
@@ -411,7 +402,7 @@
s = MIN_FONT_SIZE;
}
_absFontSize = int(s);
- if (_absFontSize<MIN_FONT_SIZE) {
+ if (_absFontSize < MIN_FONT_SIZE) {
_absFontSize = MIN_FONT_SIZE;
}
}
@@ -585,8 +576,6 @@
if (n != _dataPrecision) {
setDirty();
_dataPrecision = n;
- kdDebug() << "setDataPrecision\n";
- drawToBuffer(_parsed);
}
}
More information about the Kst
mailing list