[Kst] extragear/graphics/kst/kst

Andrew Walker arwalker at sumusltd.com
Fri Jan 27 23:39:52 CET 2006


SVN commit 503027 by arwalker:

BUG:120884 No longer allow an auto-resize text label to be resized as this is a meaningless operation.

 M  +13 -4     kstviewlabel.cpp  


--- trunk/extragear/graphics/kst/kst/kstviewlabel.cpp #503026:503027
@@ -73,7 +73,7 @@
   reparse();
   computeTextSize(_parsed);
   setDirty(false);
-  _autoResize = true;
+  setAutoResize(true);
 }
 
 
@@ -114,7 +114,7 @@
     n = n.nextSibling();
   }
 
-  _autoResize = in_autoResize;
+  setAutoResize(in_autoResize);
 }
 
 
@@ -331,7 +331,11 @@
   if (p.type() == KstPainter::P_PRINT ||
       p.type() == KstPainter::P_EXPORT) {
     if (_autoResize) {
-      adjustSizeForText(p.window());
+      if (_parent) {
+        adjustSizeForText(_parent->geometry());
+      } else {
+        adjustSizeForText(p.window());
+      }
     } else {
       computeTextSize(_parsed);
     }
@@ -350,7 +354,11 @@
     }
     if (dirty()) {
       if (_autoResize) {
-        adjustSizeForText(p.window());
+        if (_parent) {
+          adjustSizeForText(_parent->geometry());
+        } else {
+          adjustSizeForText(p.window());
+        }
         drawToBuffer(_parsed);
       } else {
         computeTextSize(_parsed);
@@ -491,6 +499,7 @@
 
 void KstViewLabel::setAutoResize(bool on) {
     _autoResize = on;
+    _isResizable = !on;
 }
 
 


More information about the Kst mailing list