[Kst] branches/work/kst/portto4/kst/src/libkstapp

Barth Netterfield netterfield at astro.utoronto.ca
Fri Jan 22 17:01:46 CET 2010


SVN commit 1078681 by netterfield:

Make labels update.



 M  +5 -3      labelitem.cpp  
 M  +3 -3      labelrenderer.h  


--- branches/work/kst/portto4/kst/src/libkstapp/labelitem.cpp #1078680:1078681
@@ -73,9 +73,11 @@
 
 
 void LabelItem::paint(QPainter *painter) {
-  if (_dirty) {
-    generateLabel();
-  }
+  // possible optimization: make _dirty actually work to save label
+  // regeneration on 'paint'.  Unlikely to be noticable though.
+  //if (_dirty || 1) {
+  generateLabel();
+  //}
 
   if (_labelRc) {
     painter->save();
--- branches/work/kst/portto4/kst/src/libkstapp/labelrenderer.h #1078680:1078681
@@ -92,17 +92,17 @@
 
   inline void addObject(Kst::VectorPtr vp) {
     _refObjects.append(vp);
-    connect(vp, SIGNAL(updated(ObjectPtr)), this, SIGNAL(labelDirty()));
+    //connect(vp, SIGNAL(updated(ObjectPtr)), this, SIGNAL(labelDirty()));
   }
 
   inline void addObject(Kst::ScalarPtr scalar) {
     _refObjects.append(scalar);
-    connect(scalar, SIGNAL(updated(ObjectPtr)), this, SIGNAL(labelDirty()));
+    //connect(scalar, SIGNAL(updated(ObjectPtr)), this, SIGNAL(labelDirty()));
   }
 
   inline void addObject(Kst::StringPtr string) {
     _refObjects.append(string);
-    connect(string, SIGNAL(updated(ObjectPtr)), this, SIGNAL(labelDirty()));
+    //connect(string, SIGNAL(updated(ObjectPtr)), this, SIGNAL(labelDirty()));
   }
 
   inline int fontSize() const {


More information about the Kst mailing list